Class: Cloudpress::Renderers::Archive
- Inherits:
-
Object
- Object
- Cloudpress::Renderers::Archive
- Defined in:
- lib/cloudpress/renderers/archive.rb
Instance Attribute Summary collapse
-
#archive ⇒ Object
readonly
Returns the value of attribute archive.
Instance Method Summary collapse
-
#initialize(context, archive) ⇒ Archive
constructor
A new instance of Archive.
- #render ⇒ Object
Constructor Details
#initialize(context, archive) ⇒ Archive
Returns a new instance of Archive.
7 8 9 10 |
# File 'lib/cloudpress/renderers/archive.rb', line 7 def initialize(context, archive) @context = context @archive = archive end |
Instance Attribute Details
#archive ⇒ Object (readonly)
Returns the value of attribute archive.
5 6 7 |
# File 'lib/cloudpress/renderers/archive.rb', line 5 def archive @archive end |
Instance Method Details
#render ⇒ Object
12 13 14 |
# File 'lib/cloudpress/renderers/archive.rb', line 12 def render @context.render(partial: 'cloudpress/archives/archive', locals: {renderer: self}) end |