Class: Calendav::Parsers::ResponseXML

Inherits:
Object
  • Object
show all
Defined in:
lib/calendav/parsers/response_xml.rb

Class Method Summary collapse

Instance Method Summary collapse

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

.callObject



10
11
12
# File 'lib/calendav/parsers/response_xml.rb', line 10

def self.call(...)
  new(...).call
end

Instance Method Details

#callObject



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