Class: Relaton::Un::HitCollection

Inherits:
Core::HitCollection show all
Defined in:
lib/relaton/un/hit_collection.rb

Constant Summary collapse

API_BASE =
"https://documents.un.org/api"

Instance Attribute Summary

Attributes inherited from Core::HitCollection

#fetched, #ref, #year

Class Method Summary collapse

Methods inherited from Core::HitCollection

#fetch, #initialize, #inspect, #reduce!, #select, #select!, #to_s, #to_xml

Constructor Details

This class inherits a constructor from Relaton::Core::HitCollection

Class Method Details

.search(text) ⇒ HitCollection

Factory method — performs the API search and populates hits.

Parameters:

  • text (String)

    symbol to search for

Returns:



15
16
17
18
19
# File 'lib/relaton/un/hit_collection.rb', line 15

def self.search(text)
  hc = new(text)
  hc.send(:fetch_hits)
  hc
end