Class: MongoMapper::DynamicFinder
- Defined in:
- lib/mongo_mapper/dynamic_finder.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#bang ⇒ Object
readonly
Returns the value of attribute bang.
-
#finder ⇒ Object
readonly
Returns the value of attribute finder.
-
#instantiator ⇒ Object
readonly
Returns the value of attribute instantiator.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
- #found? ⇒ Boolean
-
#initialize(method) ⇒ DynamicFinder
constructor
A new instance of DynamicFinder.
Constructor Details
#initialize(method) ⇒ DynamicFinder
Returns a new instance of DynamicFinder.
5 6 7 8 9 10 |
# File 'lib/mongo_mapper/dynamic_finder.rb', line 5 def initialize(method) @method = method @finder = :first @bang = false match() end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/mongo_mapper/dynamic_finder.rb', line 3 def attributes @attributes end |
#bang ⇒ Object (readonly)
Returns the value of attribute bang.
3 4 5 |
# File 'lib/mongo_mapper/dynamic_finder.rb', line 3 def bang @bang end |
#finder ⇒ Object (readonly)
Returns the value of attribute finder.
3 4 5 |
# File 'lib/mongo_mapper/dynamic_finder.rb', line 3 def finder @finder end |
#instantiator ⇒ Object (readonly)
Returns the value of attribute instantiator.
3 4 5 |
# File 'lib/mongo_mapper/dynamic_finder.rb', line 3 def instantiator @instantiator end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
3 4 5 |
# File 'lib/mongo_mapper/dynamic_finder.rb', line 3 def method @method end |
Instance Method Details
#found? ⇒ Boolean
12 13 14 |
# File 'lib/mongo_mapper/dynamic_finder.rb', line 12 def found? @finder.present? end |