Class: Solr::Response::Ping

Inherits:
Xml
  • Object
show all
Defined in:
lib/solr/response/ping.rb

Instance Attribute Summary

Attributes inherited from Xml

#doc, #status_code, #status_message

Attributes inherited from Base

#raw_response

Instance Method Summary collapse

Methods inherited from Base

make_response

Constructor Details

#initialize(xml) ⇒ Ping

Returns a new instance of Ping.



17
18
19
20
# File 'lib/solr/response/ping.rb', line 17

def initialize(xml)
  super
  @ok = REXML::XPath.first(@doc, './solr/ping') ? true : false
end

Instance Method Details

#ok?Boolean

returns true or false depending on whether the ping was successful or not

Returns:

  • (Boolean)


24
25
26
# File 'lib/solr/response/ping.rb', line 24

def ok?
  @ok
end