Class: Juggalo::Portlet

Inherits:
Object
  • Object
show all
Defined in:
lib/juggalo/portlet.rb

Defined Under Namespace

Classes: Factory, Loader

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts, loader) ⇒ Portlet

Returns a new instance of Portlet.



5
6
7
8
9
# File 'lib/juggalo/portlet.rb', line 5

def initialize(opts, loader)
  @opts     = opts
  @loader   = loader
  @location = opts["location"]
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/juggalo/portlet.rb', line 3

def id
  @id
end

#locationObject (readonly)

Returns the value of attribute location.



3
4
5
# File 'lib/juggalo/portlet.rb', line 3

def location
  @location
end

#optsObject (readonly)

Returns the value of attribute opts.



3
4
5
# File 'lib/juggalo/portlet.rb', line 3

def opts
  @opts
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/juggalo/portlet.rb', line 3

def type
  @type
end

Instance Method Details

#presentObject



11
12
13
# File 'lib/juggalo/portlet.rb', line 11

def present
  @loader.load opts
end