Class: Template::Node::TextPart
- Inherits:
-
Template::Node
- Object
- Code::Node
- Template::Node
- Template::Node::TextPart
- Defined in:
- lib/template/node/text_part.rb
Instance Method Summary collapse
- #evaluate(**_args) ⇒ Object
-
#initialize(text) ⇒ TextPart
constructor
A new instance of TextPart.
Constructor Details
#initialize(text) ⇒ TextPart
Returns a new instance of TextPart.
6 7 8 |
# File 'lib/template/node/text_part.rb', line 6 def initialize(text) @text = text end |
Instance Method Details
#evaluate(**_args) ⇒ Object
10 11 12 |
# File 'lib/template/node/text_part.rb', line 10 def evaluate(**_args) ::Code::Object::String.new(@text.to_s) end |