Module: BirdOnIt::ClassMethods

Defined in:
lib/bird_on_it.rb

Instance Method Summary collapse

Instance Method Details

#decorate_collection(collection) ⇒ Object



13
14
15
# File 'lib/bird_on_it.rb', line 13

def decorate_collection(collection)
  Array(collection).map { |item| decorator_class.new(item) }
end

#decorator_classObject



17
18
19
# File 'lib/bird_on_it.rb', line 17

def decorator_class
  Object.const_get "#{name}Decorator"
end