Method: MSpecOptions#add
- Defined in:
- lib/mspec/utils/options.rb
#add(short, long, arg, description, block) ⇒ Object
Adds documentation text for an option and adds an MSpecOption
instance to the list of registered options.
82 83 84 85 86 87 |
# File 'lib/mspec/utils/options.rb', line 82 def add(short, long, arg, description, block) s = short ? short.dup : " " s << (short ? ", " : " ") if long doc " #{s}#{long} #{arg}".ljust(@width-1) + " #{description}" @options << MSpecOption.new(short, long, arg, description, block) end |