class Rusql::Order

Constants

TYPES

Attributes

column[R]
type[R]

Public Class Methods

new(type, column) click to toggle source
# File lib/rusql/order.rb, line 11
def initialize(type, column)
  raise Exception.new("Expected type to be one of #{}") unless TYPES.include?(type)
  raise TypeException.new(Column, column.class) unless column.is_a?(Column)

  @type = type
  @column = column
end

Public Instance Methods

to_s() click to toggle source
# File lib/rusql/order.rb, line 19
def to_s
  "#{self.column.to_s} #{type.to_s.upcase}"
end