Class: Yap::Shell::Parser::Nodes::RangeNode
- Inherits:
-
Object
- Object
- Yap::Shell::Parser::Nodes::RangeNode
- Includes:
- Visitor
- Defined in:
- lib/yap/shell/parser/nodes.rb
Instance Attribute Summary collapse
-
#head ⇒ Object
Returns the value of attribute head.
-
#tail ⇒ Object
Returns the value of attribute tail.
Instance Method Summary collapse
-
#initialize(head, tail = nil) ⇒ RangeNode
constructor
A new instance of RangeNode.
- #inspect ⇒ Object
- #to_s(indent: 0) ⇒ Object
Methods included from Visitor
Constructor Details
#initialize(head, tail = nil) ⇒ RangeNode
Returns a new instance of RangeNode.
315 316 317 318 |
# File 'lib/yap/shell/parser/nodes.rb', line 315 def initialize(head, tail=nil) @head = head @tail = tail end |
Instance Attribute Details
#head ⇒ Object
Returns the value of attribute head.
313 314 315 |
# File 'lib/yap/shell/parser/nodes.rb', line 313 def head @head end |
#tail ⇒ Object
Returns the value of attribute tail.
313 314 315 |
# File 'lib/yap/shell/parser/nodes.rb', line 313 def tail @tail end |
Instance Method Details
#inspect ⇒ Object
324 325 326 |
# File 'lib/yap/shell/parser/nodes.rb', line 324 def inspect to_s end |
#to_s(indent: 0) ⇒ Object
320 321 322 |
# File 'lib/yap/shell/parser/nodes.rb', line 320 def to_s(indent:0) "(#{@head.inspect}, tail: #{tail.inspect})" end |