Module: Folio::PerPageIncluder
- Included in:
- Folio
- Defined in:
- lib/folio.rb
Overview
this funny pattern is so that if a module (e.g. Folio::Ordinal) includes this module, it won’t get the per_page attribute, but will still be able to bestow that attribute on any class that includes it.
Instance Method Summary collapse
Instance Method Details
#included(klass) ⇒ Object
67 68 69 70 71 72 73 |
# File 'lib/folio.rb', line 67 def included(klass) if klass.is_a?(Class) klass.extend ::Folio::PerPage else klass.extend ::Folio::PerPageIncluder end end |