Class: GLI::CommandLineOption
- Inherits:
-
Object
- Object
- GLI::CommandLineOption
- Defined in:
- lib/gli_patches.rb
Instance Method Summary collapse
- #ignore_default? ⇒ Boolean
-
#initialize(names, options = {}) ⇒ CommandLineOption
constructor
A new instance of CommandLineOption.
Constructor Details
#initialize(names, options = {}) ⇒ CommandLineOption
Returns a new instance of CommandLineOption.
21 22 23 24 25 26 27 28 |
# File 'lib/gli_patches.rb', line 21 def initialize(names, = {}) # Disable returning a default for this option (needed for boolean updates) # which should NOT be sent unless added by the user @ignore_default = !![:ignore_default] super(names, [:desc], [:long_desc]) @default_value = [:default_value] end |
Instance Method Details
#ignore_default? ⇒ Boolean
30 31 32 |
# File 'lib/gli_patches.rb', line 30 def ignore_default? @ignore_default end |