Class: MdlSql::Col

Inherits:
Object
  • Object
show all
Defined in:
lib/mdlsql/col.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(col, table) ⇒ Col

Returns a new instance of Col.

Parameters:

  • table (Table)
  • col (Symbol)


26
27
28
29
30
31
32
33
34
35
36
# File 'lib/mdlsql/col.rb', line 26

def initialize col, table
	# table = table.to_sym if table.is_a? String
	col = col.to_sym if col.is_a? String

	if table.is_a? String || table.is_a?
		table = Table.new table
	end

	@table = table
	@col = col
end

Instance Attribute Details

#colObject

Returns the value of attribute col.



22
23
24
# File 'lib/mdlsql/col.rb', line 22

def col
  @col
end

#tableObject

Returns the value of attribute table.



22
23
24
# File 'lib/mdlsql/col.rb', line 22

def table
  @table
end