Class: Prequel::Relations::Table::TableDefinitionContext

Inherits:
Object
  • Object
show all
Defined in:
lib/prequel/relations/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table) ⇒ TableDefinitionContext

Returns a new instance of TableDefinitionContext.



46
47
48
# File 'lib/prequel/relations/table.rb', line 46

def initialize(table)
  @table = table
end

Instance Attribute Details

#tableObject (readonly)

Returns the value of attribute table.



45
46
47
# File 'lib/prequel/relations/table.rb', line 45

def table
  @table
end

Instance Method Details

#column(name, type) ⇒ Object



50
51
52
# File 'lib/prequel/relations/table.rb', line 50

def column(name, type)
  table.def_column(name, type)
end