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