Method: Bundler::Thor::Base::ClassMethods#class_option
- Defined in:
- lib/bundler/vendor/thor/lib/thor/base.rb
#class_option(name, options = {}) ⇒ Object
Adds an option to the set of class options
Parameters
- name<Symbol>
-
The name of the argument.
- options<Hash>
-
Described below.
Options
- :desc
-
– Description for the argument.
- :required
-
– If the argument is required or not.
- :default
-
– Default value for this argument.
- :group
-
– The group for this options. Use by class options to output options in different levels.
- :aliases
-
– Aliases for this option. Note: Bundler::Thor follows a convention of one-dash-one-letter options. Thus aliases like “-something” wouldn’t be parsed; use either “--something” or “-s” instead.
- :type
-
– The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
- :banner
-
– String to show on usage notes.
- :hide
-
– If you want to hide this option from the help.
273 274 275 |
# File 'lib/bundler/vendor/thor/lib/thor/base.rb', line 273 def class_option(name, = {}) build_option(name, , ) end |