class Gleborator::BaseDecorator

Attributes

model[R]
object[R]
source[R]
to_source[R]

Public Class Methods

decorate_collection(collection) click to toggle source
# File lib/gleborator/base_decorator.rb, line 12
def self.decorate_collection(collection)
  collection.map {|object| new(object) }
end
delegate(*methods) click to toggle source
Calls superclass method
# File lib/gleborator/base_decorator.rb, line 16
def self.delegate(*methods)
  options = methods.extract_options!
  super *methods, options.reverse_merge(to: :object)
end
new(object) click to toggle source
# File lib/gleborator/base_decorator.rb, line 8
def initialize(object)
  @object = object
end