class ThorExtend::CommandWrapper
Attributes
command[R]
Public Class Methods
new(cmd)
click to toggle source
# File lib/thor_extend/command_wrapper.rb, line 5 def initialize(cmd) @command = cmd end
Public Instance Methods
add(option_name, args)
click to toggle source
# File lib/thor_extend/command_wrapper.rb, line 9 def add(option_name, args) raise ArgumentError if option_name.nil? @command.options[option_name.to_sym] = Thor::Option.new(option_name.to_sym, args) self end