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