Class: CLI::Values
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- CLI::Values
- Defined in:
- lib/cli.rb
Instance Method Summary collapse
Instance Method Details
#append(argument, value) ⇒ Object
100 101 102 103 104 |
# File 'lib/cli.rb', line 100 def append(argument, value) v = (send(argument.name.to_s) or []) v << value send((argument.name.to_s + '=').to_sym, v) end |
#set(argument) ⇒ Object
106 107 108 |
# File 'lib/cli.rb', line 106 def set(argument) value(argument, true) end |
#value(argument, value) ⇒ Object
96 97 98 |
# File 'lib/cli.rb', line 96 def value(argument, value) send((argument.name.to_s + '=').to_sym, value) end |