Class: ABNF::Compiler::AST::Leaf
- Inherits:
-
Object
- Object
- ABNF::Compiler::AST::Leaf
- Defined in:
- lib/abnf/compiler/ast.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #==(other_node) ⇒ Object
-
#initialize(text) ⇒ Leaf
constructor
A new instance of Leaf.
- #inner_text ⇒ Object
Constructor Details
#initialize(text) ⇒ Leaf
Returns a new instance of Leaf.
11 12 13 |
# File 'lib/abnf/compiler/ast.rb', line 11 def initialize text @text = text end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
9 10 11 |
# File 'lib/abnf/compiler/ast.rb', line 9 def text @text end |
Instance Method Details
#==(other_node) ⇒ Object
15 16 17 |
# File 'lib/abnf/compiler/ast.rb', line 15 def == other_node other_node.respond_to? :text and text == other_node.text end |
#inner_text ⇒ Object
19 20 21 |
# File 'lib/abnf/compiler/ast.rb', line 19 def inner_text text end |