Class: Expgen::Nodes::Node
- Inherits:
-
Object
- Object
- Expgen::Nodes::Node
- Defined in:
- lib/expgen/nodes.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#ast ⇒ Object
readonly
Returns the value of attribute ast.
Instance Method Summary collapse
-
#initialize(ast) ⇒ Node
constructor
A new instance of Node.
- #max ⇒ Object
- #repeat ⇒ Object
Constructor Details
#initialize(ast) ⇒ Node
Returns a new instance of Node.
6 7 8 |
# File 'lib/expgen/nodes.rb', line 6 def initialize(ast) @ast = ast end |
Instance Attribute Details
#ast ⇒ Object (readonly)
Returns the value of attribute ast.
4 5 6 |
# File 'lib/expgen/nodes.rb', line 4 def ast @ast end |
Instance Method Details
#max ⇒ Object
14 15 16 |
# File 'lib/expgen/nodes.rb', line 14 def max ast[:max] end |
#repeat ⇒ Object
10 11 12 |
# File 'lib/expgen/nodes.rb', line 10 def repeat ast[:repeat] end |