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.


5
6
7
# File 'lib/sunzi/cli/secrets.rb', line 5

def env
  @env
end

Instance Method Details

#load_env(stage) ⇒ Object


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

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