Class: SQLValList
Overview
Class container - a list of SQLValue scalars
Instance Attribute Summary
Attributes inherited from SQLObject
#alias, #inline, #name, #separator
Instance Method Summary collapse
- #<<(list) ⇒ Object
-
#initialize(*list) ⇒ SQLValList
constructor
A new instance of SQLValList.
- #to_s ⇒ Object
Methods inherited from SQLObject
#_name, #_string, #_string=, get
Constructor Details
#initialize(*list) ⇒ SQLValList
Returns a new instance of SQLValList.
173 174 175 |
# File 'lib/sqlobject.rb', line 173 def initialize ( *list ) @list = list.map { |item| SQLObject.get item } end |
Instance Method Details
#<<(list) ⇒ Object
177 178 179 180 |
# File 'lib/sqlobject.rb', line 177 def << ( list ) list.map! { |item| SQLObject.get item } @list += list end |
#to_s ⇒ Object
182 183 184 185 |
# File 'lib/sqlobject.rb', line 182 def to_s return @string if @string @string = "(" + @list.join( "," ) + ")" end |