Class: Platform::ITL::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/introhive_templating_language/itl/template.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.parse(source) ⇒ Object



21
22
23
# File 'lib/introhive_templating_language/itl/template.rb', line 21

def parse(source)
    new(convert_template_source(source))
end

Instance Method Details

#codeObject



9
10
11
# File 'lib/introhive_templating_language/itl/template.rb', line 9

def code
    @code
end

#evaluate(evaluation_context) ⇒ Object



5
6
7
# File 'lib/introhive_templating_language/itl/template.rb', line 5

def evaluate(evaluation_context)
    Platform::IEL::Evaluator.string_value_of(Platform::IEL::Evaluator.eval_expr(@code, evaluation_context))
end