Class: Frenchy::Collection
- Inherits:
-
Array
- Object
- Array
- Frenchy::Collection
- Defined in:
- lib/frenchy/collection.rb
Instance Method Summary collapse
-
#decorate ⇒ Object
Decorate the collection using the name of the decorator inferred by the first record.
-
#nil? ⇒ Boolean
Backwards compatibility for old version of draper.
Instance Method Details
#decorate ⇒ Object
Decorate the collection using the name of the decorator inferred by the first record
4 5 6 7 |
# File 'lib/frenchy/collection.rb', line 4 def decorate decorator_class = "#{first.class.name}Decorator".constantize decorator_class.decorate(self) end |
#nil? ⇒ Boolean
Backwards compatibility for old version of draper
10 11 12 |
# File 'lib/frenchy/collection.rb', line 10 def nil? none? end |