Class: Medie::OpenSearch::Descriptor

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

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Descriptor

Returns a new instance of Descriptor.



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

def initialize(hash)
  @hash = hash["OpenSearchDescription"]
end

Instance Method Details

#urlsObject



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

def urls
  uris = @hash["Url"]
  uris.kind_of?(Array) ? uris : [uris]
end