Class: Arel::Nodes::Ordering

Inherits:
Unary
  • Object
show all
Defined in:
lib/arel/visitors/sqlserver.rb

Overview

Extending the Ordering class to be comparrison friendly which allows us to call #uniq on a collection of them. See SelectManager#order for more details.

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



13
14
15
# File 'lib/arel/visitors/sqlserver.rb', line 13

def ==(other)
  other.is_a?(Arel::Nodes::Ordering) && self.expr == other.expr
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/arel/visitors/sqlserver.rb', line 16

def eql?(other)
  self == other
end

#hashObject



10
11
12
# File 'lib/arel/visitors/sqlserver.rb', line 10

def hash
  expr.hash
end