aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/engines/memory
diff options
context:
space:
mode:
authorBryan Helmkamp <bryan@brynary.com>2009-09-30 23:32:05 -0400
committerBryan Helmkamp <bryan@brynary.com>2009-09-30 23:32:05 -0400
commitbcd8ffa2183a1ca98417fb39bbd83e8f69c984c8 (patch)
tree36eac8c0fdd0a6a126a10dd7ad829401793a9379 /lib/arel/engines/memory
parent52e8aff146c162986566d3e03852395729d7c24d (diff)
downloadrails-bcd8ffa2183a1ca98417fb39bbd83e8f69c984c8.tar.gz
rails-bcd8ffa2183a1ca98417fb39bbd83e8f69c984c8.tar.bz2
rails-bcd8ffa2183a1ca98417fb39bbd83e8f69c984c8.zip
Create Predicates module to match directory structure
Diffstat (limited to 'lib/arel/engines/memory')
-rw-r--r--lib/arel/engines/memory/predicates.rb50
1 files changed, 26 insertions, 24 deletions
diff --git a/lib/arel/engines/memory/predicates.rb b/lib/arel/engines/memory/predicates.rb
index 03d4f25b0a..dd2559c70f 100644
--- a/lib/arel/engines/memory/predicates.rb
+++ b/lib/arel/engines/memory/predicates.rb
@@ -1,35 +1,37 @@
module Arel
- class Binary < Predicate
- def eval(row)
- operand1.eval(row).send(operator, operand2.eval(row))
+ module Predicates
+ class Binary < Predicate
+ def eval(row)
+ operand1.eval(row).send(operator, operand2.eval(row))
+ end
end
- end
- class Equality < Binary
- def operator; :== end
- end
+ class Equality < Binary
+ def operator; :== end
+ end
- class GreaterThanOrEqualTo < Binary
- def operator; :>= end
- end
+ class GreaterThanOrEqualTo < Binary
+ def operator; :>= end
+ end
- class GreaterThan < Binary
- def operator; :> end
- end
+ class GreaterThan < Binary
+ def operator; :> end
+ end
- class LessThanOrEqualTo < Binary
- def operator; :<= end
- end
+ class LessThanOrEqualTo < Binary
+ def operator; :<= end
+ end
- class LessThan < Binary
- def operator; :< end
- end
+ class LessThan < Binary
+ def operator; :< end
+ end
- class Match < Binary
- def operator; :=~ end
- end
+ class Match < Binary
+ def operator; :=~ end
+ end
- class In < Binary
- def operator; :include? end
+ class In < Binary
+ def operator; :include? end
+ end
end
end