Module: Representable::Apply
- Defined in:
- lib/representable/apply.rb
Instance Method Summary collapse
-
#apply(&block) ⇒ Object
Iterates over all property/collection definitions and yields the Definition instance.
Instance Method Details
#apply(&block) ⇒ Object
Iterates over all property/collection definitions and yields the Definition instance.
4 5 6 7 8 9 10 11 |
# File 'lib/representable/apply.rb', line 4 def apply(&block) representable_attrs.each do |dfn| block.call(dfn) dfn.representer_module.extend(Apply).apply(&block) if dfn.representer_module # nested. end self end |