Class: Calendav::Parsers::ResponseXML
- Inherits:
-
Object
- Object
- Calendav::Parsers::ResponseXML
- Defined in:
- lib/calendav/parsers/response_xml.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(raw, namespaces = NAMESPACES) ⇒ ResponseXML
constructor
A new instance of ResponseXML.
Constructor Details
#initialize(raw, namespaces = NAMESPACES) ⇒ ResponseXML
Returns a new instance of ResponseXML.
14 15 16 17 |
# File 'lib/calendav/parsers/response_xml.rb', line 14 def initialize(raw, namespaces = NAMESPACES) @raw = raw @namespaces = namespaces end |
Class Method Details
.call ⇒ Object
10 11 12 |
# File 'lib/calendav/parsers/response_xml.rb', line 10 def self.call(...) new(...).call end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 |
# File 'lib/calendav/parsers/response_xml.rb', line 19 def call return document if document.xpath("/dav:multistatus").empty? MultiResponse.new(document) end |