Class: Dendroid::Parsing::EmptyRuleNode
- Defined in:
- lib/dendroid/parsing/empty_rule_node.rb
Instance Attribute Summary collapse
-
#alt_index ⇒ Object
readonly
Returns the value of attribute alt_index.
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
Attributes inherited from ParseNode
Instance Method Summary collapse
-
#accept(aVisitor) ⇒ Object
Part of the ‘visitee’ role in Visitor design pattern.
-
#initialize(anEItem, rank) ⇒ EmptyRuleNode
constructor
A new instance of EmptyRuleNode.
- #to_s ⇒ Object
Constructor Details
#initialize(anEItem, rank) ⇒ EmptyRuleNode
Returns a new instance of EmptyRuleNode.
11 12 13 14 15 |
# File 'lib/dendroid/parsing/empty_rule_node.rb', line 11 def initialize(anEItem, rank) super(rank, rank) @rule = WeakRef.new(anEItem.dotted_item.rule) @alt_index = anEItem.dotted_item.alt_index end |
Instance Attribute Details
#alt_index ⇒ Object (readonly)
Returns the value of attribute alt_index.
9 10 11 |
# File 'lib/dendroid/parsing/empty_rule_node.rb', line 9 def alt_index @alt_index end |
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
8 9 10 |
# File 'lib/dendroid/parsing/empty_rule_node.rb', line 8 def rule @rule end |
Instance Method Details
#accept(aVisitor) ⇒ Object
Part of the ‘visitee’ role in Visitor design pattern.
23 24 25 |
# File 'lib/dendroid/parsing/empty_rule_node.rb', line 23 def accept(aVisitor) aVisitor.visit_empty_rule_node(self) end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/dendroid/parsing/empty_rule_node.rb', line 17 def to_s "_ #{super}" end |