class Oc::Config

Public Class Methods

get(key) click to toggle source
# File lib/system/config.rb, line 6
def self.get(key)
  config = Netrc.read("#{(ENV["HOME"] || "./")}/oc.netrc")
  config = config["api.digitalocean.com"]
  options = {
    :api_key => config[0]
  }
  return options[:"#{key}"]
end
get_barge() click to toggle source
# File lib/system/config.rb, line 14
def self.get_barge
  barge = ::Barge::Client.new(access_token: self.get(:api_key))
end