config.rb 445 B

1234567891011121314151617181920212223242526
  1. # frozen_string_literal: true
  2. require 'yaml'
  3. # NeoInfra Account information
  4. module NeoInfra
  5. # load the config
  6. class Config
  7. attr_reader :config
  8. def initialize(cfg = 'config.yaml')
  9. @config = YAML.load_file(
  10. File.join(File.dirname(File.expand_path(__FILE__)),
  11. '..', '..', cfg)
  12. )
  13. end
  14. def neo4j
  15. @config['neo4j']
  16. end
  17. def accounts
  18. @config['accounts']
  19. end
  20. end
  21. end