class Radical::Table

Attributes

columns[RW]

Public Class Methods

new(table) click to toggle source
# File lib/radical/table.rb, line 7
def initialize(table)
  @table = table
  @columns = []
end

Public Instance Methods

integer(name) click to toggle source
# File lib/radical/table.rb, line 16
def integer(name)
  @columns << "#{name} integer"
end
string(name) click to toggle source
# File lib/radical/table.rb, line 12
def string(name)
  @columns << "#{name} text"
end
timestamps() click to toggle source
# File lib/radical/table.rb, line 20
def timestamps
  @columns << "created_at integer not null default(strftime('%s', 'now'))"
  @columns << 'updated_at integer'
end