Class: Georgia::WidgetPortlet
- Defined in:
- app/presenters/georgia/widget_portlet.rb
Instance Attribute Summary collapse
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
-
#ui_section ⇒ Object
readonly
Returns the value of attribute ui_section.
-
#widget ⇒ Object
readonly
Returns the value of attribute widget.
Attributes inherited from Portlet
Attributes inherited from Presenter
Instance Method Summary collapse
-
#initialize(view_context, ui_association, args = {}) ⇒ WidgetPortlet
constructor
A new instance of WidgetPortlet.
- #to_s ⇒ Object
Methods inherited from Portlet
#handle_tag, #id, #portlet_tag
Constructor Details
#initialize(view_context, ui_association, args = {}) ⇒ WidgetPortlet
Returns a new instance of WidgetPortlet.
9 10 11 12 13 14 |
# File 'app/presenters/georgia/widget_portlet.rb', line 9 def initialize view_context, ui_association, args={} @widget = args.fetch(:widget, ui_association.) @ui_section = args.fetch(:ui_section, ui_association.ui_section) @revision = args.fetch(:revision, ui_association.revision) super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Georgia::Presenter
Instance Attribute Details
#revision ⇒ Object (readonly)
Returns the value of attribute revision.
7 8 9 |
# File 'app/presenters/georgia/widget_portlet.rb', line 7 def revision @revision end |
#ui_section ⇒ Object (readonly)
Returns the value of attribute ui_section.
7 8 9 |
# File 'app/presenters/georgia/widget_portlet.rb', line 7 def ui_section @ui_section end |
#widget ⇒ Object (readonly)
Returns the value of attribute widget.
7 8 9 |
# File 'app/presenters/georgia/widget_portlet.rb', line 7 def @widget end |
Instance Method Details
#to_s ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/presenters/georgia/widget_portlet.rb', line 16 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 << ui_section_id_input_tag output << output << page_id_input_tag output << content_tag(:div, title_tag, class: 'pull-left') output << actions_tag portlet_tag(output) end |