Class: Cassanity::ArgumentGenerators::OrderClause

Inherits:
Object
  • Object
show all
Defined in:
lib/cassanity/argument_generators/order_clause.rb

Instance Method Summary collapse

Instance Method Details

#call(args = {}) ⇒ Object

Internal



6
7
8
9
10
11
12
13
14
# File 'lib/cassanity/argument_generators/order_clause.rb', line 6

def call(args = {})
  order = args[:order]

  if order.nil? || order.empty?
    ['']
  else
    [" ORDER BY #{order}"]
  end
end