multiple aliases for options #192

Closed
simrb opened this Issue Nov 3, 2011 · 2 comments

Projects

None yet

2 participants

@simrb
desc 'bar', 'bar'
method_options :with => :string, :version => :numeric
def bar
    puts 'say ' + options[:with] + options[:version]
end

How to add the aliases for 'version' end 'with' options , such as the '-w' and '-v'

@eventualbuddha

Check out the method options section of the wiki.

@simrb
desc 'module_test', 'test'
method_option :with, :type => :string, :aliases => '-w'
method_option :focus, :type => :boolean, :aliases => '-f'
def module_test
    puts options[:with] if options[:focus]
end

it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment