Class: VagrantPlugins::Dustcloud::Credentials

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-dustcloud/config.rb

Instance Method Summary collapse

Instance Method Details

#get_token(token_file) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/vagrant-dustcloud/config.rb', line 43

def get_token(token_file)
    if !token_file.nil? && File.exists?(token_file)
        File.read(token_file)
    else
        ENV["DUSTCLOUD_TOKEN"].to_s
    end
end