Exception: Twitch::ErrorGenerator

Inherits:
StandardError
  • Object
show all
Defined in:
lib/twitch/error_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_body, http_status_code) ⇒ ErrorGenerator

Returns a new instance of ErrorGenerator.



7
8
9
10
11
12
# File 'lib/twitch/error_generator.rb', line 7

def initialize(response_body, http_status_code)
  @response_body = response_body
  @http_status_code = http_status_code
  set_twitch_error_values
  super(build_message)
end

Instance Attribute Details

#http_status_codeObject (readonly)

Returns the value of attribute http_status_code.



3
4
5
# File 'lib/twitch/error_generator.rb', line 3

def http_status_code
  @http_status_code
end

#twitch_error_codeObject (readonly)

Returns the value of attribute twitch_error_code.



4
5
6
# File 'lib/twitch/error_generator.rb', line 4

def twitch_error_code
  @twitch_error_code
end

#twitch_error_messageObject (readonly)

Returns the value of attribute twitch_error_message.



5
6
7
# File 'lib/twitch/error_generator.rb', line 5

def twitch_error_message
  @twitch_error_message
end