lib/juggalo/portlet.rb in juggalo-0.0.1 vs lib/juggalo/portlet.rb in juggalo-0.0.2

- old
+ new

@@ -1,22 +1,16 @@ module Juggalo class Portlet attr_reader :id, :type, :opts, :location - def initialize(opts, loader = nil) - @opts = opts - + def initialize(opts, loader) + @opts = opts + @loader = loader @location = opts["location"] end - def render - "<div>#{opts}</div>" + def present + @loader.load opts end - end - - class Portlet::Loader - attr_reader :adapter - - class HTTP; end end end