Class: GdsApi::Worldwide
- Inherits:
-
Base
- Object
- Base
- GdsApi::Worldwide
- Defined in:
- lib/gds_api/worldwide.rb
Instance Method Summary collapse
- #organisations_for_world_location(location_slug) ⇒ Object
- #world_location(location_slug) ⇒ Object
- #world_locations ⇒ Object
Instance Method Details
#organisations_for_world_location(location_slug) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/gds_api/worldwide.rb', line 18 def organisations_for_world_location(location_slug) worldwide_organisations = worldwide_organisations_for_location(location_slug) worldwide_organisations.map do |organisation| worldwide_organisation(organisation["link"]) end end |
#world_location(location_slug) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/gds_api/worldwide.rb', line 8 def world_location(location_slug) world_location = all_world_locations.find do |location| location.dig("details", "slug") == location_slug end raise GdsApi::HTTPNotFound, 404 unless world_location world_location end |
#world_locations ⇒ Object
4 5 6 |
# File 'lib/gds_api/worldwide.rb', line 4 def world_locations all_world_locations end |