Class: Puree::XMLExtractor::Server
- Defined in:
- lib/puree/xml_extractor/server.rb
Overview
Server XML extractor.
Instance Method Summary collapse
-
#get_data? ⇒ Boolean
Is there any data after get?.
-
#initialize(xml:) ⇒ Server
constructor
A new instance of Server.
- #version ⇒ String
Methods inherited from Base
#xpath_query_for_multi_value, #xpath_query_for_single_value
Constructor Details
#initialize(xml:) ⇒ Server
Returns a new instance of Server.
9 10 11 12 |
# File 'lib/puree/xml_extractor/server.rb', line 9 def initialize(xml:) @resource_type = :server super end |
Instance Method Details
#get_data? ⇒ Boolean
Is there any data after get?
23 24 25 26 |
# File 'lib/puree/xml_extractor/server.rb', line 23 def get_data? # n.b. arbitrary element existence check version.empty? ? false : true end |
#version ⇒ String
15 16 17 18 |
# File 'lib/puree/xml_extractor/server.rb', line 15 def version path = "#{service_response_name}/baseVersion" @doc.xpath(path).text.strip end |