Class: ActiveWorkbench::Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/active_workbench/base.rb

Instance Method Summary collapse

Instance Method Details

#add_table(id, name) ⇒ Object



10
11
12
13
14
# File 'lib/active_workbench/base.rb', line 10

def add_table id, name
  @tables_ids ||= {}
  @tables_names ||= {}
  @tables_ids[id] = @tables_names[name] = Table.new(self, id, name)
end

#generateObject



28
29
30
# File 'lib/active_workbench/base.rb', line 28

def generate
  
end

#table_by_id(id) ⇒ Object



20
21
22
# File 'lib/active_workbench/base.rb', line 20

def table_by_id id
  @tables_ids[id]
end

#table_by_name(name) ⇒ Object



24
25
26
# File 'lib/active_workbench/base.rb', line 24

def table_by_name name
  @tables_names[name]
end

#tablesObject



16
17
18
# File 'lib/active_workbench/base.rb', line 16

def tables
  @tables_ids.values
end