Method: Bundler::Thor::Option#initialize
- Defined in:
- lib/bundler/vendor/thor/lib/thor/parser/option.rb
permalink #initialize(name, options = {}) ⇒ Option
Returns a new instance of Option.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/bundler/vendor/thor/lib/thor/parser/option.rb', line 7 def initialize(name, = {}) @check_default_type = [:check_default_type] [:required] = false unless .key?(:required) @repeatable = .fetch(:repeatable, false) super @lazy_default = [:lazy_default] @group = [:group].to_s.capitalize if [:group] @aliases = normalize_aliases([:aliases]) @hide = [:hide] end |