Class: Georgia::LinkPortlet
- Defined in:
- app/presenters/georgia/link_portlet.rb
Instance Attribute Summary
Attributes inherited from Portlet
Attributes inherited from Presenter
Instance Method Summary collapse
-
#initialize(view_context, link, args = {}) ⇒ LinkPortlet
constructor
A new instance of LinkPortlet.
- #to_s ⇒ Object
Methods inherited from Portlet
#handle_tag, #id, #portlet_tag
Constructor Details
#initialize(view_context, link, args = {}) ⇒ LinkPortlet
Returns a new instance of LinkPortlet.
6 7 8 9 |
# File 'app/presenters/georgia/link_portlet.rb', line 6 def initialize view_context, link, args={} @content = args.fetch(:content, link.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_s ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'app/presenters/georgia/link_portlet.rb', line 11 def to_s form = ActiveSupport::SafeBuffer.new form << handle_tag form << link_form_fields form << actions_tag output = ActiveSupport::SafeBuffer.new output << content_tag(:div, form) output << (last_descendant? ? empty_portlet_list : children_portlets) portlet_tag(output) end |