Class: Commands::FlagOption
- Inherits:
-
CommandOption
- Object
- CommandOption
- Commands::FlagOption
- Defined in:
- lib/commands.rb
Instance Attribute Summary
Attributes inherited from CommandOption
#arg, #commands, #description, #name, #parent_commands
Instance Method Summary collapse
- #attach(commands) ⇒ Object
-
#initialize(name, description, arg, parent_commands, commands, field_symbol) ⇒ FlagOption
constructor
A new instance of FlagOption.
Constructor Details
#initialize(name, description, arg, parent_commands, commands, field_symbol) ⇒ FlagOption
Returns a new instance of FlagOption.
1226 1227 1228 1229 |
# File 'lib/commands.rb', line 1226 def initialize(name, description, arg, parent_commands, commands, field_symbol) super(name, description, arg, parent_commands, commands) @field_symbol = field_symbol end |
Instance Method Details
#attach(commands) ⇒ Object
1231 1232 1233 1234 |
# File 'lib/commands.rb', line 1231 def attach(commands) command = super(commands) command.option(@name, @field_symbol, true) end |