Exception: Prowler::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/prowler/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(document) ⇒ Error

:nodoc:



9
10
11
12
13
14
# File 'lib/prowler/response.rb', line 9

def initialize(document) #:nodoc:
  error = document.elements["prowl/error"]

  @status = error.attributes["code"].to_i
  @message = "Prowl Failure: #{error.text}"
end

Instance Attribute Details

#messageObject (readonly)

The error message returned by the Prowl API



7
8
9
# File 'lib/prowler/response.rb', line 7

def message
  @message
end

#statusObject (readonly)

The status code returned by the Prowl API



4
5
6
# File 'lib/prowler/response.rb', line 4

def status
  @status
end