module Glipper::Initializer
Attributes
helpers[R]
o[R]
object[R]
object_classes[R]
resource[R]
Public Class Methods
new(object, helpers=ActionController::Base.helpers)
click to toggle source
# File lib/glipper/initializer.rb, line 19 def initialize(object, helpers=ActionController::Base.helpers) raise "#{object} is not instance of #{@object_classes.join(', ')}" unless self.class.object_classes.find { |object_class| object.is_a?(object_class) } @helpers = helpers @object = object end
Public Instance Methods
decorate(another_resource)
click to toggle source
# File lib/glipper/initializer.rb, line 25 def decorate(another_resource) self.class.decorate(another_resource) end