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.



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