Class: Cadenza::TextNode
- Inherits:
-
Object
- Object
- Cadenza::TextNode
- Defined in:
- lib/cadenza/nodes/text_node.rb
Overview
The TextNode is a very simple container for static text defined in your template.
Instance Attribute Summary collapse
-
#text ⇒ String
The content of the text in this node.
Instance Method Summary collapse
-
#==(rhs) ⇒ Boolean
True if the given TextNode is equivalent by value to this node.
-
#implied_globals ⇒ Array
A list of global variable names implied by this node (none).
-
#initialize(text) ⇒ TextNode
constructor
Creates a new TextNode with the given text.
Constructor Details
#initialize(text) ⇒ TextNode
Creates a new Cadenza::TextNode with the given text
10 11 12 |
# File 'lib/cadenza/nodes/text_node.rb', line 10 def initialize(text) @text = text end |
Instance Attribute Details
#text ⇒ String
Returns the content of the text in this node.
6 7 8 |
# File 'lib/cadenza/nodes/text_node.rb', line 6 def text @text end |
Instance Method Details
#==(rhs) ⇒ Boolean
Returns true if the given Cadenza::TextNode is equivalent by value to this node.
22 23 24 |
# File 'lib/cadenza/nodes/text_node.rb', line 22 def ==(rhs) @text == rhs.text end |
#implied_globals ⇒ Array
Returns a list of global variable names implied by this node (none).
15 16 17 |
# File 'lib/cadenza/nodes/text_node.rb', line 15 def implied_globals [] end |