Class: ORB::AST::BlockNode
- Inherits:
-
AbstractNode
- Object
- AbstractNode
- ORB::AST::BlockNode
- Defined in:
- lib/orb/ast/block_node.rb
Instance Attribute Summary
Attributes inherited from AbstractNode
#attributes, #children, #errors
Instance Method Summary collapse
- #expression ⇒ Object
-
#initialize(token) ⇒ BlockNode
constructor
A new instance of BlockNode.
- #name ⇒ Object
-
#render(_context) ⇒ Object
TODO: Support render to text for different block types.
Methods inherited from AbstractNode
Constructor Details
#initialize(token) ⇒ BlockNode
Returns a new instance of BlockNode.
6 7 8 9 10 |
# File 'lib/orb/ast/block_node.rb', line 6 def initialize(token) super @name = token.value @meta = token. end |
Instance Method Details
#expression ⇒ Object
16 17 18 |
# File 'lib/orb/ast/block_node.rb', line 16 def expression @meta.fetch(:expression, false) end |
#name ⇒ Object
12 13 14 |
# File 'lib/orb/ast/block_node.rb', line 12 def name @name.to_sym end |
#render(_context) ⇒ Object
TODO: Support render to text for different block types
21 22 23 |
# File 'lib/orb/ast/block_node.rb', line 21 def render(_context) raise "BlockNode#render not implemented." end |