Class: Commands::GlobalOption
- Inherits:
-
CommandOption
- Object
- CommandOption
- Commands::GlobalOption
- Defined in:
- lib/commands.rb
Instance Attribute Summary
Attributes inherited from CommandOption
#arg, #commands, #description, #name, #parent_commands
Instance Method Summary collapse
Methods inherited from CommandOption
Constructor Details
This class inherits a constructor from Commands::CommandOption
Instance Method Details
#attach(commands) ⇒ Object
715 716 717 718 719 720 721 722 723 724 725 726 |
# File 'lib/commands.rb', line 715 def attach(commands) = @commands. value = [@field_symbol] if value.is_a?(Array) then value << @arg elsif value == nil then [@field_symbol] = @arg else raise RuntimeError, "You may not specify #{@name} twice" end return nil end |