Method: Thor::Base::ClassMethods#class_options

Defined in:
lib/thor/base.rb

#class_options(options = nil) ⇒ Object

Adds a bunch of options to the set of class options.

class_options :foo => false, :bar => :required, :baz => :string

If you prefer more detailed declaration, check class_option.

Parameters

Hash[Symbol => Object]

[View source]

306
307
308
309
310
# File 'lib/thor/base.rb', line 306

def class_options(options = nil)
  @class_options ||= from_superclass(:class_options, {})
  build_options(options, @class_options) if options
  @class_options
end