Class: Parslet::Pattern::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/abstract-sql/transform/statement.rb

Instance Method Summary collapse

Instance Method Details

#bool(n) ⇒ Object



80
81
82
83
84
85
86
# File 'lib/abstract-sql/transform/statement.rb', line 80

def bool(n)
  if (b = String(n).downcase) == 'not' 
    operator('not_bool') 
  else
    n
  end
end

#operator(op) ⇒ Object



72
73
74
75
76
77
78
# File 'lib/abstract-sql/transform/statement.rb', line 72

def operator(op)
  if op.is_a?(Symbol)
    op
  else
    ( "-" + String(op) ).downcase.to_sym
  end
end