Class: Cloudpress::Renderers::Archive

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudpress/renderers/archive.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#archiveObject (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

#renderObject



12
13
14
# File 'lib/cloudpress/renderers/archive.rb', line 12

def render
  @context.render(partial: 'cloudpress/archives/archive', locals: {renderer: self})
end