aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/math.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/math.rb')
-rw-r--r--lib/arel/math.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/arel/math.rb b/lib/arel/math.rb
new file mode 100644
index 0000000000..b7c2419233
--- /dev/null
+++ b/lib/arel/math.rb
@@ -0,0 +1,19 @@
+module Arel
+ module Math
+ def *(other)
+ Arel::Nodes::Multiplication.new(self, other)
+ end
+
+ def +(other)
+ Arel::Nodes::Addition.new(self, other)
+ end
+
+ def -(other)
+ Arel::Nodes::Subtraction.new(self, other)
+ end
+
+ def /(other)
+ Arel::Nodes::Division.new(self, other)
+ end
+ end
+end