Class: CommandMapper::Gen::OptionValue
- Defined in:
- lib/command_mapper/gen/option_value.rb
Instance Attribute Summary
Attributes inherited from Arg
Instance Method Summary collapse
-
#to_ruby ⇒ String
Converts the parsed option to Ruby source code.
Methods inherited from Arg
Constructor Details
This class inherits a constructor from CommandMapper::Gen::Arg
Instance Method Details
#to_ruby ⇒ String
Converts the parsed option to Ruby source code.
13 14 15 16 17 18 19 |
# File 'lib/command_mapper/gen/option_value.rb', line 13 def to_ruby ruby = super() if ruby.empty? then "true" else "{#{ruby}}" end end |