Class: ActiveMapper::Adapter::Memory::Query
- Inherits:
-
Object
- Object
- ActiveMapper::Adapter::Memory::Query
- Defined in:
- lib/active_mapper/adapter/memory/query.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ Query
constructor
A new instance of Query.
- #method_missing(name, *args, &block) ⇒ Object
- #to_proc ⇒ Object
Constructor Details
#initialize(&block) ⇒ Query
Returns a new instance of Query.
8 9 10 |
# File 'lib/active_mapper/adapter/memory/query.rb', line 8 def initialize(&block) @block = block end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Method Details
#to_proc ⇒ Object
12 13 14 |
# File 'lib/active_mapper/adapter/memory/query.rb', line 12 def to_proc @block ? @block.call(self).to_proc : proc { true } end |