Class: Luban::CLI::NullableOption
- Defined in:
- lib/luban/cli/base/option.rb
Instance Attribute Summary
Attributes inherited from Argument
#description, #display_name, #name, #value
Instance Method Summary collapse
Methods inherited from Option
#default_imperative, #default_str, #specs
Methods inherited from Argument
#[], #assured?, #default_imperative, #default_type, #has_default?, #initialize, #match?, #missing?, #multiple?, #optional?, #required?, #reset, #valid?, #validate, #within?
Constructor Details
This class inherits a constructor from Luban::CLI::Argument
Instance Method Details
#kind ⇒ Object
42 |
# File 'lib/luban/cli/base/option.rb', line 42 def kind; @kind ||= "nullable option"; end |
#value=(val) ⇒ Object
44 45 46 47 48 |
# File 'lib/luban/cli/base/option.rb', line 44 def value=(val) super @value = true if @value.nil? @value end |