Module: Mongoid::Relations::Reflections::ClassMethods
- Defined in:
- lib/mongoid/relations/reflections.rb
Overview
:nodoc
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.
39 40 41 |
# File 'lib/mongoid/relations/reflections.rb', line 39 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.
27 28 29 |
# File 'lib/mongoid/relations/reflections.rb', line 27 def reflect_on_association(name) relations[name.to_s] end |