class SfHealthFacilities::Facilities

Attributes

facility_name[R]
facility_type[R]
location_address[R]

Public Class Methods

all() click to toggle source
# File lib/sf_health_facilities.rb, line 15
def self.all
  facility_array = Unirest.get("https://data.sfgov.org/resource/sci7-7q9i.json").body
  facilities = []
  facility_array.each do |facility_hash|
    facilities << Facilities.new(facility_hash)
  end
  return facilities
end
new(hash) click to toggle source
# File lib/sf_health_facilities.rb, line 9
def initialize(hash)
  @facility_name = hash["facility_name"]
  @facility_type = hash["facility_type"]
  @location_address = hash["location_address"]
end