module Representable::Apply

Public Instance Methods

apply(&block) click to toggle source

Iterates over all property/collection definitions and yields the Definition instance.

# 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