Add mapper Symbol -> String

This commit is contained in:
sophia 2021-12-09 13:36:29 -06:00 committed by Paul Hinze
parent a4694bcf91
commit 6eaf399501
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -28,6 +28,20 @@ module VagrantPlugins
") ")
end end
class SymbolToString < Mapper
def initialize
super(
inputs: [Input.new(type: Symbol)],
output: String,
func: method(:converter),
)
end
def converter(sym)
sym.to_s
end
end
class HashToProto < Mapper class HashToProto < Mapper
def initialize def initialize
super( super(