Class: Georgia::SlidePortlet

Inherits:
Portlet show all
Defined in:
app/presenters/georgia/slide_portlet.rb

Instance Attribute Summary

Attributes inherited from Portlet

#portlet

Attributes inherited from Presenter

#view_context

Instance Method Summary collapse

Methods inherited from Portlet

#handle_tag, #id, #portlet_tag

Constructor Details

#initialize(view_context, slide, args = {}) ⇒ SlidePortlet

Returns a new instance of SlidePortlet.



6
7
8
9
# File 'app/presenters/georgia/slide_portlet.rb', line 6

def initialize view_context, slide, args={}
  @content = args.fetch(:content, slide.content)
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Georgia::Presenter

Instance Method Details

#to_sObject



11
12
13
14
15
16
17
18
19
20
# File 'app/presenters/georgia/slide_portlet.rb', line 11

def to_s
  output = ActiveSupport::SafeBuffer.new
  output << handle_tag
  output << destroy_input_tag
  output << position_input_tag
  output << id_input_tag if persisted?
  output << actions_tag
  output << slide_tag
  portlet_tag(output)
end