Class: ShellOpts::Ast::Option
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Optional value.
Attributes inherited from Node
Instance Method Summary collapse
-
#dump ⇒ Object
:nocov:.
-
#initialize(grammar, name, value) ⇒ Option
constructor
A new instance of Option.
- #values ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(grammar, name, value) ⇒ Option
Returns a new instance of Option.
7 8 9 10 |
# File 'lib/shellopts/ast/option.rb', line 7 def initialize(grammar, name, value) super(grammar, name) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Optional value. Can be a String, Integer, or Float
5 6 7 |
# File 'lib/shellopts/ast/option.rb', line 5 def value @value end |
Instance Method Details
#dump ⇒ Object
:nocov:
15 16 17 |
# File 'lib/shellopts/ast/option.rb', line 15 def dump super { puts "values: #{values.inspect}" } end |
#values ⇒ Object
12 |
# File 'lib/shellopts/ast/option.rb', line 12 def values() value end |