Class: Arel::Nodes::Ordering

Inherits:
Binary
  • 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



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

def ==(other)
  self.class == other.class && self.expr == other.expr
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/arel/visitors/sqlserver.rb', line 20

def eql?(other)
  self == other
end

#hashObject



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

def hash
  expr.hash
end