Class: Relaton::Un::HitCollection

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

Constant Summary collapse

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

Class Method Summary collapse

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