Exception: WebPush::ResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/web_push/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, host) ⇒ ResponseError

Returns a new instance of ResponseError.



11
12
13
14
15
# File 'lib/web_push/errors.rb', line 11

def initialize(response, host)
  @response = response
  @host = host
  super "host: #{host}, #{@response.inspect}\nbody:\n#{@response.body}"
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



9
10
11
# File 'lib/web_push/errors.rb', line 9

def host
  @host
end

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/web_push/errors.rb', line 9

def response
  @response
end