Class: ActiveRecord::HashOptions::GTE

Inherits:
GenericOp
  • Object
show all
Defined in:
lib/active_record/hash_options/operators.rb

Instance Attribute Summary

Attributes inherited from GenericOp

#expression, #expression2

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from GenericOp

#initialize, quote

Constructor Details

This class inherits a constructor from ActiveRecord::HashOptions::GenericOp

Class Method Details

.arel_procObject



43
44
45
# File 'lib/active_record/hash_options/operators.rb', line 43

def self.arel_proc
  proc { |column, op| Arel::Nodes::GreaterThanOrEqual.new(column, GenericOp.quote(op.expression, column)) }
end

Instance Method Details

#call(val) ⇒ Object



47
48
49
# File 'lib/active_record/hash_options/operators.rb', line 47

def call(val)
  val && val >= expression
end