Module: Aitch::ResponseParser::XMLParser

Defined in:
lib/aitch/response_parser/xml_parser.rb

Class Method Summary collapse

Class Method Details

.load(source) ⇒ Object


14
15
16
# File 'lib/aitch/response_parser/xml_parser.rb', line 14

def self.load(source)
  Nokogiri::XML(source.to_s, nil, "utf-8")
end

.match?(content_type) ⇒ Boolean

Returns:

  • (Boolean)

10
11
12
# File 'lib/aitch/response_parser/xml_parser.rb', line 10

def self.match?(content_type)
  content_type =~ /xml/
end

.typeObject


6
7
8
# File 'lib/aitch/response_parser/xml_parser.rb', line 6

def self.type
  :xml
end