Module: Tripod::Embeds::ClassMethods
- Defined in:
- lib/tripod/embeds.rb
Instance Method Summary collapse
Instance Method Details
#embeds(name, predicate, opts = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/tripod/embeds.rb', line 21 def (name, predicate, opts={}) re_define_method name do (name, predicate, opts) end # use this as a way to get to all the embedded properties for validation @_EMBEDDED ||= [] @_EMBEDDED << name end |
#get_embedded ⇒ Object
31 32 33 |
# File 'lib/tripod/embeds.rb', line 31 def @_EMBEDDED || [] end |