class SimpleTemplates::AST::Text
A Text
specialized Node
that implements the render
method for text inputs
Public Instance Methods
+(other)
click to toggle source
Appends the content of the Text
node to another node, keeping the position and checking if both are allowed or not. @param other [SimpleTemplates::AST::Text] @return [SimpleTemplates::AST::Text]
# File lib/simple_templates/AST/text.rb, line 23 def +(other) Text.new(contents + other.contents, pos, allowed && other.allowed) end
render(context)
click to toggle source
Renders the content of the node. It doesn’t use the context just takes the class contents. @param context [Hash{ Symbol => String }] @return [String] returns the contents
of the class since it doesn’t
apply any substitution
# File lib/simple_templates/AST/text.rb, line 15 def render(context) contents end