Class: Jerakia::Client::Token
- Inherits:
-
Object
- Object
- Jerakia::Client::Token
- Defined in:
- lib/jerakia/client/token.rb
Class Method Summary collapse
Class Method Details
.load_from_file ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/jerakia/client/token.rb', line 6 def load_from_file [ File.join(ENV['HOME'] || '', ".jerakia", "jerakia.yaml"), "/etc/jerakia/jerakia.yaml", ]. each do |file| if File.exists?(file) config = YAML.load(File.read(file)) return config['client_token'] if config['client_token'] end end return nil end |