Class: Sappy::Responses::AddMonitor

Inherits:
Sappy::Response show all
Defined in:
lib/sappy/responses/add_monitor.rb

Instance Attribute Summary collapse

Attributes inherited from Sappy::Response

#data, #xml

Instance Method Summary collapse

Methods inherited from Sappy::Response

#error_response, #error_response?, #failure, #first_xpath, #initialize, parse, #parse

Constructor Details

This class inherits a constructor from Sappy::Response

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/sappy/responses/add_monitor.rb', line 4

def id
  @id
end

Instance Method Details

#successObject



6
7
8
9
# File 'lib/sappy/responses/add_monitor.rb', line 6

def success
  node = first_xpath('//monitor')
  @id = node && node['id']
end