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



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

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

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



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

def message
  @message
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#to_sObject



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

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