Class: Medie::OpenSearch::Driver

Inherits:
Object
  • Object
show all
Defined in:
lib/medie/open_search/driver.rb

Instance Method Summary collapse

Instance Method Details

#can_handle?(content_type) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/medie/open_search/driver.rb', line 10

def can_handle?(content_type)
  !(content_type.nil? || content_type.split(";")[0]!="application/opensearchdescription+xml")
end

#unmarshal(xml) ⇒ Object



5
6
7
8
# File 'lib/medie/open_search/driver.rb', line 5

def unmarshal(xml)
  hash = Medie::Xml::Driver.new.unmarshal(xml)
  descriptor = Descriptor.new(hash)
end