Module: Mongoid::Relations::Reflections::ClassMethods
- Defined in:
- lib/mongoid/relations/reflections.rb
Instance Method Summary collapse
-
#reflect_on_all_associations(*macros) ⇒ Array<Metadata>
Returns all relation metadata for the supplied macros.
-
#reflect_on_association(name) ⇒ Metadata
Returns the relation metadata for the supplied name.
Instance Method Details
#reflect_on_all_associations(*macros) ⇒ Array<Metadata>
Returns all relation metadata for the supplied macros.
56 57 58 |
# File 'lib/mongoid/relations/reflections.rb', line 56 def reflect_on_all_associations(*macros) relations.values.select { || macros.include?(.macro) } end |
#reflect_on_association(name) ⇒ Metadata
Returns the relation metadata for the supplied name.
44 45 46 |
# File 'lib/mongoid/relations/reflections.rb', line 44 def reflect_on_association(name) relations[name.to_s] end |