Exception: Dropbox::ClientError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/dropbox/errors.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ ClientError

Returns a new instance of ClientError.



15
16
17
# File 'lib/dropbox/errors.rb', line 15

def initialize(message=nil)
  @message = message
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



5
6
7
# File 'lib/dropbox/errors.rb', line 5

def message
  @message
end

Class Method Details

.invalid_access_tokenObject



7
8
9
# File 'lib/dropbox/errors.rb', line 7

def self.invalid_access_token
  self.new("Invalid access token")
end

.unknown_response_type(str) ⇒ Object



11
12
13
# File 'lib/dropbox/errors.rb', line 11

def self.unknown_response_type(str)
  self.new("Unknown response type '#{str}'")
end

Instance Method Details

#to_sObject



19
20
21
# File 'lib/dropbox/errors.rb', line 19

def to_s
  @message.to_s
end