Sha256: 696fffc9dbfea249392d9e6518f12895824bbe93fc20d4443de7124e88d0e292

Contents?: true

Size: 266 Bytes

Versions: 2

Compression:

Stored size: 266 Bytes

Contents

class GreaterThanEqual < Arity2Operators
  Operator.register('>=', GreaterThanEqual, 8)

  def to_sql
    "(#{@left.to_sql} >= #{@right.to_sql})"
  end

  def evaluate(attributes={})
    @left.evaluate(attributes).to_i >= @right.evaluate(attributes).to_i
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lamep-0.2.1 lib/lamep/Expressions/greater_than_equal.rb
lamep-0.2 lib/lamep/Expressions/greater_than_equal.rb