Exception: Storify::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/storify/apierror.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, message, type = nil) ⇒ ApiError

Returns a new instance of ApiError.



5
6
7
8
9
# File 'lib/storify/apierror.rb', line 5

def initialize(status, message, type = nil)
  @type = type
  @status = status
  @message = message
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/storify/apierror.rb', line 3

def message
  @message
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/storify/apierror.rb', line 3

def status
  @status
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/storify/apierror.rb', line 3

def type
  @type
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/storify/apierror.rb', line 11

def to_s
  "#{self.status} #{self.type} #{self.message}"
end