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.
11 12 13 14 15 |
# File 'lib/onebox/view.rb', line 11 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.
9 10 11 |
# File 'lib/onebox/view.rb', line 9 def record @record end |
Instance Method Details
#to_html ⇒ Object
17 18 19 |
# File 'lib/onebox/view.rb', line 17 def to_html render(record) end |