Class: Influxdb::Arel::Nodes::Ordering

Inherits:
Unary show all
Defined in:
lib/influxdb/arel/nodes/ordering.rb

Constant Summary collapse

REVERSALS =
{ asc: :desc, desc: :asc }.freeze

Constants inherited from Node

Node::ENTENSIONS

Instance Attribute Summary

Attributes inherited from Unary

#expr

Instance Method Summary collapse

Methods inherited from Unary

#eql?, #hash, #initialize, #initialize_copy

Methods inherited from Node

#extend, #to_sql

Methods included from Extensions::BooleanPredications

#and, #or

Constructor Details

This class inherits a constructor from Influxdb::Arel::Nodes::Unary

Instance Method Details

#invertObject



9
10
11
# File 'lib/influxdb/arel/nodes/ordering.rb', line 9

def invert
  Ordering.new(REVERSALS[direction.to_sym])
end