Class: MongoMapper::DynamicFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/mongo_mapper/dynamic_finder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributesObject (readonly)

Returns the value of attribute attributes.



3
4
5
# File 'lib/mongo_mapper/dynamic_finder.rb', line 3

def attributes
  @attributes
end

#bangObject (readonly)

Returns the value of attribute bang.



3
4
5
# File 'lib/mongo_mapper/dynamic_finder.rb', line 3

def bang
  @bang
end

#finderObject (readonly)

Returns the value of attribute finder.



3
4
5
# File 'lib/mongo_mapper/dynamic_finder.rb', line 3

def finder
  @finder
end

#instantiatorObject (readonly)

Returns the value of attribute instantiator.



3
4
5
# File 'lib/mongo_mapper/dynamic_finder.rb', line 3

def instantiator
  @instantiator
end

#methodObject (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

Returns:



12
13
14
# File 'lib/mongo_mapper/dynamic_finder.rb', line 12

def found?
  @finder.present?
end