Class: Thor::SharedOption
- Defined in:
- lib/thor/parser/shared_option.rb
Overview
Constant Summary
Constants inherited from Option
Constants inherited from Argument
Instance Attribute Summary collapse
-
#groups ⇒ Set<Symbol>
readonly
Shared option groups this option belongs to.
Attributes inherited from Option
#aliases, #group, #hide, #lazy_default
Attributes inherited from Argument
#banner, #default, #description, #enum, #name, #required, #type
Instance Method Summary collapse
-
#initialize(name, **options) ⇒ SharedOption
constructor
A new instance of SharedOption.
Methods inherited from Option
#dasherize, #dasherized?, #human_name, parse, #switch_name, #undasherize, #usage, #validate!, #validate_default_type!
Methods inherited from Argument
#default_banner, #required?, #show_default?, #usage, #valid_type?, #validate!
Constructor Details
#initialize(name, **options) ⇒ SharedOption
Returns a new instance of SharedOption.
17 18 19 20 21 |
# File 'lib/thor/parser/shared_option.rb', line 17 def initialize name, ** super name, @groups = Set.new [*[:groups]].map( &:to_sym ) end |
Instance Attribute Details
#groups ⇒ Set<Symbol> (readonly)
Shared option groups this option belongs to.
13 14 15 |
# File 'lib/thor/parser/shared_option.rb', line 13 def groups @groups end |