Class: Mack::Portlet::Manager

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/mack/portlets/manager.rb

Overview

Used to manage the Portlets associated with the application.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeManager

:nodoc:



12
13
14
# File 'lib/mack/portlets/manager.rb', line 12

def initialize # :nodoc:
  @required_portlet_list = []
end

Instance Attribute Details

#required_portlet_listObject

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, options = {})
  @required_portlet_list << name
  @required_portlet_list.uniq!
  Mack::Utils::GemManager.instance.add(name, options)
end