class GreatSchools::District
GreatSchools
District
¶ ↑
– TODO: add method to grab schools using +GreatSchools::School#nearby+ with the address
, city
, state
, and zip_code
options (parsing address). Filter results to schools with a matching district name. ++
Attributes
address[RW]
charter_schools[RW]
district_rating[RW]
elementary_schools[RW]
fax[RW]
grade_range[RW]
high_schools[RW]
middle_schools[RW]
name[RW]
nces_code[RW]
phone[RW]
public_schools[RW]
total_schools[RW]
website[RW]
Public Class Methods
browse(state, city)
click to toggle source
Returns a list of school districts in a city.
Attributes¶ ↑
-
state
- Two letter state abbreviation -
city
- Name of city
# File lib/great_schools/district.rb, line 22 def browse(state, city) response = GreatSchools::API.get("districts/#{state.upcase}/#{parameterize(city)}") Array.wrap(response).map { |district| new(district) } end