Class: Dropbox::Explorer::Credentials
- Inherits:
-
Object
- Object
- Dropbox::Explorer::Credentials
- Defined in:
- lib/dropbox/explorer/credentials.rb
Instance Method Summary collapse
-
#initialize(credentials) ⇒ Credentials
constructor
A new instance of Credentials.
- #parse! ⇒ Object
Constructor Details
#initialize(credentials) ⇒ Credentials
Returns a new instance of Credentials.
7 8 9 |
# File 'lib/dropbox/explorer/credentials.rb', line 7 def initialize(credentials) @credentials = credentials end |
Instance Method Details
#parse! ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/dropbox/explorer/credentials.rb', line 11 def parse! if @credentials && @credentials[:config_path] @credentials = YAML.load(File.read(@credentials[:config_path])).symbolize_keys else raise ArgumentError, "There is no path for the credentials config file" end end |