Method: TableSetter::Table.all

Defined in:
lib/table_setter/table.rb

.allObject

Returns all the tables in the table directory. Each table is deferred so accessing the @data attribute will throw and error.



179
180
181
182
183
184
185
186
# File 'lib/table_setter/table.rb', line 179

def all
  tables=[]
  Dir.glob("#{TableSetter.table_path}/*.yml").each do |file|
    table = new(File.basename(file, ".yml"), :defer => true)
    tables << table if table.live
  end
  tables
end