Class: Glossarist::Collections::TableCollection

Inherits:
NonVerbalCollection
  • Object
show all
Defined in:
lib/glossarist/collections/table_collection.rb

Class Method Summary collapse

Methods inherited from NonVerbalCollection

#by_id, #entries, #exists?, #ids, #store

Class Method Details

.from_directory(dir) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/glossarist/collections/table_collection.rb', line 10

def self.from_directory(dir)
  collection = new
  Dir.glob(File.join(dir, "*.yaml")).each do |path|
    tbl = Table.from_file(path)
    collection.store(tbl) if tbl
  end
  collection
end