Class: SQLCondList

Inherits:
SQLObject show all
Defined in:
lib/sqlobject.rb

Instance Attribute Summary

Attributes inherited from SQLObject

#alias, #inline, #name, #separator

Instance Method Summary collapse

Methods inherited from SQLObject

#_name, #_string, #_string=, get

Constructor Details

#initialize(hash = { }) ⇒ SQLCondList

Returns a new instance of SQLCondList.



273
274
275
# File 'lib/sqlobject.rb', line 273

def initialize ( hash = { } )
    @hash = Hash[ hash.map{ |k,v|  [ SQLObject.get( k ), SQLObject.get( v ) ] } ]
end

Instance Method Details

#<<(new_hash) ⇒ Object



277
278
279
# File 'lib/sqlobject.rb', line 277

def << ( new_hash )
    @hash.merge! new_hash
end

#to_sObject



281
282
283
# File 'lib/sqlobject.rb', line 281

def to_s
    @hash.map{ |k,v| k.to_s + "=" + v.to_s }.join( "," )
end