Class: ActiveMapper::Adapter::Memory::InvertedExpression
- Inherits:
-
Expression
- Object
- Expression
- ActiveMapper::Adapter::Memory::InvertedExpression
- Defined in:
- lib/active_mapper/adapter/memory/query/expression.rb
Instance Method Summary collapse
-
#initialize(value, comparator, attribute) ⇒ InvertedExpression
constructor
A new instance of InvertedExpression.
- #to_proc ⇒ Object
Methods inherited from Expression
Constructor Details
#initialize(value, comparator, attribute) ⇒ InvertedExpression
31 32 33 |
# File 'lib/active_mapper/adapter/memory/query/expression.rb', line 31 def initialize(value, comparator, attribute) super(attribute, comparator, value) end |
Instance Method Details
#to_proc ⇒ Object
35 36 37 38 39 |
# File 'lib/active_mapper/adapter/memory/query/expression.rb', line 35 def to_proc proc do |object| @value.send(@comparator, object.send(@attribute)) end end |