Module: Sunzi::Cli::Database
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
Instance Method Summary collapse
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env.
5 6 7 |
# File 'lib/sunzi/cli/database.rb', line 5 def env @env end |
Instance Method Details
#load_env(stage) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/sunzi/cli/database.rb', line 7 def load_env(stage) path = File.('config/database.yml') @env = YAML.load(File.read(path))[stage] scope_keys @env = HashWithIndifferentAccess.new(@env) end |