Class: Txdb::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/txdb/config.rb

Class Method Summary collapse

Class Method Details

.databasesObject



7
8
9
10
11
# File 'lib/txdb/config.rb', line 7

def databases
  @databases ||= raw_config[:databases].map do |database_config|
    Database.new(database_config)
  end
end

.each_table(&block) ⇒ Object



13
14
15
16
# File 'lib/txdb/config.rb', line 13

def each_table(&block)
  return to_enum(__method__) unless block_given?
  databases.each { |database| database.tables.each(&block) }
end