Exception: Webpush::ResponseError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, host) ⇒ ResponseError

Returns a new instance of ResponseError.



9
10
11
12
13
# File 'lib/webpush/errors.rb', line 9

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.



7
8
9
# File 'lib/webpush/errors.rb', line 7

def host
  @host
end

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/webpush/errors.rb', line 7

def response
  @response
end