Class: Template::Node::TextPart

Inherits:
Template::Node show all
Defined in:
lib/template/node/text_part.rb

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ TextPart

Returns a new instance of TextPart.



4
5
6
# File 'lib/template/node/text_part.rb', line 4

def initialize(text)
  @text = text
end

Instance Method Details

#evaluate(**args) ⇒ Object



8
9
10
# File 'lib/template/node/text_part.rb', line 8

def evaluate(**args)
  ::Code::Object::String.new(@text.to_s)
end