Class: Semlogr::Templates::Template
- Inherits:
-
Object
- Object
- Semlogr::Templates::Template
- Defined in:
- lib/semlogr/templates/template.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#tokens ⇒ Object
Returns the value of attribute tokens.
Instance Method Summary collapse
-
#initialize(tokens) ⇒ Template
constructor
A new instance of Template.
- #render(output, properties) ⇒ Object
Constructor Details
#initialize(tokens) ⇒ Template
Returns a new instance of Template.
8 9 10 |
# File 'lib/semlogr/templates/template.rb', line 8 def initialize(tokens) @tokens = tokens end |
Instance Attribute Details
#tokens ⇒ Object
Returns the value of attribute tokens.
6 7 8 |
# File 'lib/semlogr/templates/template.rb', line 6 def tokens @tokens end |
Instance Method Details
#render(output, properties) ⇒ Object
12 13 14 15 16 |
# File 'lib/semlogr/templates/template.rb', line 12 def render(output, properties) @tokens.each do |token| token.render(output, properties) end end |