Class: Jets::Commands::Db::Tasks::Dummy::Config

Inherits:
RecursiveOpenStruct
  • Object
show all
Defined in:
lib/jets/commands/db/tasks/dummy/config.rb

Instance Method Summary collapse

Instance Method Details

#load_database_yamlObject

:nodoc:



5
6
7
8
9
10
11
12
# File 'lib/jets/commands/db/tasks/dummy/config.rb', line 5

def load_database_yaml # :nodoc:
  require "rails/application/dummy_erb_compiler"

  path = "#{Jets.root}/config/database.yml"
  yaml = Pathname.new(path)
  erb = DummyERB.new(yaml.read)
  YAML.load(erb.result) || {}
end