Class: Stash::Config
- Inherits:
-
Object
- Object
- Stash::Config
- Defined in:
- lib/stash/config.rb
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(config_file = "#{ENV['HOME']}/.stashconfig.yml") ⇒ Config
constructor
A new instance of Config.
- #password ⇒ Object
- #user ⇒ Object
Constructor Details
#initialize(config_file = "#{ENV['HOME']}/.stashconfig.yml") ⇒ Config
Returns a new instance of Config.
5 6 7 8 9 |
# File 'lib/stash/config.rb', line 5 def initialize(config_file = "#{ENV['HOME']}/.stashconfig.yml") @config_file = config_file fail "#{@config_file} does not exist" unless File.exist?(@config_file) end |
Instance Method Details
#host ⇒ Object
11 12 13 |
# File 'lib/stash/config.rb', line 11 def host config['stash_url'] end |
#password ⇒ Object
19 20 21 |
# File 'lib/stash/config.rb', line 19 def password config['password'] end |
#user ⇒ Object
15 16 17 |
# File 'lib/stash/config.rb', line 15 def user config['username'] end |