Class: Braai::Template
- Inherits:
-
Object
- Object
- Braai::Template
- Extended by:
- Matchers
- Includes:
- Matchers
- Defined in:
- lib/braai/template.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(template, matchers = {}) ⇒ Template
constructor
A new instance of Template.
- #render(attributes = {}) ⇒ Object
Methods included from Matchers
clear!, map, matchers, reset!, unmap
Constructor Details
#initialize(template, matchers = {}) ⇒ Template
Returns a new instance of Template.
8 9 10 11 |
# File 'lib/braai/template.rb', line 8 def initialize(template, matchers = {}) self.template = template @matchers = self.class.matchers.merge(matchers) end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/braai/template.rb', line 5 def attributes @attributes end |
#template ⇒ Object
Returns the value of attribute template.
6 7 8 |
# File 'lib/braai/template.rb', line 6 def template @template end |