Sha256: 5c559d0eeb70f1608d86f8386a26f5e793c6d3ac49ebdca029d7d8e2f3677f23

Contents?: true

Size: 324 Bytes

Versions: 1

Compression:

Stored size: 324 Bytes

Contents

class SQLTree::Node

  def inspect
    "#{self.class.name}[#{self.to_sql}]"
  end
  
  def quote_var(name)
    "\"#{name}\""
  end
  
  def quote_str(str)
    "'#{str.gsub(/\'/, "''")}'"
  end
  
  def self.[](arg)
    case arg
      when Symbol; Variable.new(arg.to_s)
      else;        Value.new(arg) 
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wvanbergen-sql_tree-0.0.1 lib/sql_tree/node.rb