Method: PgDice::ConfigurationFileLoader#load_file
- Defined in:
- lib/pgdice/configuration_file_loader.rb
#load_file ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/pgdice/configuration_file_loader.rb', line 25 def load_file return if @file_loaded @file_loaded = true @file_validator.call(config_file) @config.approved_tables = @config_loader.call(config_file) .fetch('approved_tables') .reduce(tables(@config)) do |tables, hash| tables << PgDice::Table.from_hash(hash) end end |