Method: GitCommander::Command#add_option
- Defined in:
- lib/git_commander/command.rb
#add_option(option_type, options = {}) ⇒ Object
Add to this Command’s #arguments, #flags, or #switches
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/git_commander/command.rb', line 97 def add_option(option_type, = {}) case option_type.to_sym when :argument @arguments << Option.new(**) when :flag @flags << Option.new(**) when :switch @switches << Option.new(**) end end |