class SQLConstructor::QAttr
Attributes
name[R]
no_commas[R]
text[R]
type[R]
val[RW]
val_type[R]
Public Class Methods
new( init_hash = nil )
click to toggle source
# File lib/sqlconstructor.rb, line 198 def initialize ( init_hash = nil ) if init_hash.is_a? Hash @name = init_hash[:name] @text = init_hash[:text] @val = init_hash[:val] @val_type = init_hash[:val_type] @type = init_hash[:type] @no_commas = init_hash[:no_commas] end end
Public Instance Methods
to_s()
click to toggle source
# File lib/sqlconstructor.rb, line 210 def to_s if [ SQLValList, SQLAliasedList ].include? @val result = @val.to_s else result = @text if @val val_arr = @val.is_a?( Array ) ? @val : [ @val ] result += " " + val_arr.join( "," ) end end return result end