Class: ActiveMapper::Adapter::Memory::NotExpression
- Inherits:
-
Expression
- Object
- Expression
- ActiveMapper::Adapter::Memory::NotExpression
- Defined in:
- lib/active_mapper/adapter/memory/query/expression.rb
Instance Method Summary collapse
-
#initialize(expression) ⇒ NotExpression
constructor
A new instance of NotExpression.
- #to_proc ⇒ Object
Methods inherited from Expression
Constructor Details
#initialize(expression) ⇒ NotExpression
Returns a new instance of NotExpression.
43 44 45 |
# File 'lib/active_mapper/adapter/memory/query/expression.rb', line 43 def initialize(expression) @expression = expression end |
Instance Method Details
#to_proc ⇒ Object
47 48 49 50 51 |
# File 'lib/active_mapper/adapter/memory/query/expression.rb', line 47 def to_proc proc do |object| !@expression.to_proc.call(object) end end |