Add mapper Symbol -> String
This commit is contained in:
parent
a4694bcf91
commit
6eaf399501
@ -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(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user