Module: BirdOnIt::ClassMethods
- Defined in:
- lib/bird_on_it.rb
Instance Method Summary collapse
Instance Method Details
#decorate_collection(collection) ⇒ Object
13 14 15 16 |
# File 'lib/bird_on_it.rb', line 13 def decorate_collection(collection) collection = collection.to_a collection.map { |item| decorator_class.new(item) } end |
#decorator_class ⇒ Object
18 19 20 |
# File 'lib/bird_on_it.rb', line 18 def decorator_class Object.const_get "#{name}Decorator" end |