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.
10 11 12 13 |
# File 'lib/semlogr/templates/template.rb', line 10 def initialize(text, tokens) @text = text @tokens = tokens end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
8 9 10 |
# File 'lib/semlogr/templates/template.rb', line 8 def text @text end |
#tokens ⇒ Object
Returns the value of attribute tokens.
8 9 10 |
# File 'lib/semlogr/templates/template.rb', line 8 def tokens @tokens end |
Instance Method Details
#render(output, properties) ⇒ Object
15 16 17 18 19 |
# File 'lib/semlogr/templates/template.rb', line 15 def render(output, properties) @tokens.each do |token| token.render(output, properties) end end |