Class: Onebox::View
- Inherits:
-
Mustache
- Object
- Mustache
- Onebox::View
- Includes:
- TemplateSupport
- Defined in:
- lib/onebox/view.rb
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(name, record) ⇒ View
constructor
A new instance of View.
- #to_html ⇒ Object
Methods included from TemplateSupport
Constructor Details
#initialize(name, record) ⇒ View
Returns a new instance of View.
9 10 11 12 13 |
# File 'lib/onebox/view.rb', line 9 def initialize(name, record) @record = record self.template_name = name self.template_path = load_paths.last end |
Instance Attribute Details
#record ⇒ Object (readonly)
Returns the value of attribute record.
7 8 9 |
# File 'lib/onebox/view.rb', line 7 def record @record end |
Instance Method Details
#to_html ⇒ Object
15 16 17 |
# File 'lib/onebox/view.rb', line 15 def to_html render(record) end |