Exception: Jikanrb::Error

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

Overview

Base error for the gem

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, response: nil, status: nil) ⇒ Error

Returns a new instance of Error.



8
9
10
11
12
# File 'lib/jikanrb/errors.rb', line 8

def initialize(message = nil, response: nil, status: nil)
  @response = response
  @status = status
  super(message)
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



6
7
8
# File 'lib/jikanrb/errors.rb', line 6

def response
  @response
end

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'lib/jikanrb/errors.rb', line 6

def status
  @status
end