From e7cdaedb6bc7d452142b9b8c42942d659efcd11a Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 7 Mar 2011 08:35:48 -0800 Subject: cleaning up math operations on attributes --- lib/arel/attributes/attribute.rb | 9 +++------ lib/arel/math.rb | 4 +--- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'lib/arel') diff --git a/lib/arel/attributes/attribute.rb b/lib/arel/attributes/attribute.rb index bd3f4b58f1..5aea87ac43 100644 --- a/lib/arel/attributes/attribute.rb +++ b/lib/arel/attributes/attribute.rb @@ -3,18 +3,15 @@ module Arel class Attribute < Struct.new :relation, :name include Arel::Expressions include Arel::Predications - end - - class NumericAttribute < Attribute include Arel::Math end class String < Attribute; end class Time < Attribute; end class Boolean < Attribute; end - class Decimal < NumericAttribute; end - class Float < NumericAttribute; end - class Integer < NumericAttribute; end + class Decimal < Attribute; end + class Float < Attribute; end + class Integer < Attribute; end class Undefined < Attribute; end end diff --git a/lib/arel/math.rb b/lib/arel/math.rb index 551b1f1010..b7c2419233 100644 --- a/lib/arel/math.rb +++ b/lib/arel/math.rb @@ -1,6 +1,5 @@ module Arel module Math - def *(other) Arel::Nodes::Multiplication.new(self, other) end @@ -16,6 +15,5 @@ module Arel def /(other) Arel::Nodes::Division.new(self, other) end - end -end \ No newline at end of file +end -- cgit v1.2.3