Class: Estatic::Page
- Inherits:
-
Object
- Object
- Estatic::Page
- Defined in:
- lib/estatic/page.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#resource ⇒ Object
Returns the value of attribute resource.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(resource) ⇒ Page
constructor
A new instance of Page.
Constructor Details
#initialize(resource) ⇒ Page
Returns a new instance of Page.
5 6 7 |
# File 'lib/estatic/page.rb', line 5 def initialize(resource) @resource = resource end |
Instance Attribute Details
#resource ⇒ Object
Returns the value of attribute resource.
3 4 5 |
# File 'lib/estatic/page.rb', line 3 def resource @resource end |
Instance Method Details
#content ⇒ Object
9 10 11 |
# File 'lib/estatic/page.rb', line 9 def content Tilt.new(template).render(self, resource.locals) end |