Module: Sunzi::Cli::Secrets

Extended by:
Secrets
Included in:
Secrets
Defined in:
lib/sunzi/cli/secrets.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#envObject

Returns the value of attribute env.



7
8
9
# File 'lib/sunzi/cli/secrets.rb', line 7

def env
  @env
end

Instance Method Details

#load_env(stage) ⇒ Object



9
10
11
12
# File 'lib/sunzi/cli/secrets.rb', line 9

def load_env(stage)
  path = File.expand_path('config/secrets.yml')
  @env = HashWithIndifferentAccess.new(YAML.load(File.read(path))[stage])
end