aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes/unary_operation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/nodes/unary_operation.rb')
-rw-r--r--lib/arel/nodes/unary_operation.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/arel/nodes/unary_operation.rb b/lib/arel/nodes/unary_operation.rb
new file mode 100644
index 0000000000..1636c01279
--- /dev/null
+++ b/lib/arel/nodes/unary_operation.rb
@@ -0,0 +1,25 @@
+module Arel
+ module Nodes
+
+ class UnaryOperation < Unary
+ include Arel::Expressions
+ include Arel::Predications
+ include Arel::OrderPredications
+ include Arel::AliasPredication
+ include Arel::Math
+
+ attr_reader :operator
+
+ def initialize operator, operand
+ super(operand)
+ @operator = operator
+ end
+ end
+
+ class BitwiseNot < UnaryOperation
+ def initialize operand
+ super(:~, operand)
+ end
+ end
+ end
+end \ No newline at end of file