Class: Oc::Config
- Inherits:
-
Object
- Object
- Oc::Config
- Defined in:
- lib/system/config.rb
Class Method Summary collapse
Class Method Details
.get(key) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/system/config.rb', line 6 def self.get(key) config = Netrc.read("#{(ENV["HOME"] || "./")}/oc.netrc") config = config["api.digitalocean.com"] = { :api_key => config[0] } return [:"#{key}"] end |
.get_barge ⇒ Object
14 15 16 |
# File 'lib/system/config.rb', line 14 def self. = ::Barge::Client.new(access_token: self.get(:api_key)) end |