Class: Mack::Portlet::Manager
- Includes:
- Singleton
- Defined in:
- lib/mack/portlets/manager.rb
Overview
Used to manage the Portlets associated with the application.
Instance Attribute Summary collapse
-
#required_portlet_list ⇒ Object
Returns the value of attribute required_portlet_list.
Instance Method Summary collapse
-
#add(name, options = {}) ⇒ Object
Adds a Portlet to the application.
-
#initialize ⇒ Manager
constructor
:nodoc:.
Constructor Details
#initialize ⇒ Manager
:nodoc:
12 13 14 |
# File 'lib/mack/portlets/manager.rb', line 12 def initialize # :nodoc: @required_portlet_list = [] end |
Instance Attribute Details
#required_portlet_list ⇒ Object
Returns the value of attribute required_portlet_list.
10 11 12 |
# File 'lib/mack/portlets/manager.rb', line 10 def required_portlet_list @required_portlet_list end |
Instance Method Details
#add(name, options = {}) ⇒ Object
Adds a Portlet to the application. This takes the same parameters as Mack::Utils::GemManager.instance.add
18 19 20 21 22 |
# File 'lib/mack/portlets/manager.rb', line 18 def add(name, = {}) @required_portlet_list << name @required_portlet_list.uniq! Mack::Utils::GemManager.instance.add(name, ) end |