class GreatSchools::Score
GreatSchools
Score
¶ ↑
Attributes
rank[RW]
school_name[RW]
tests[RW]
Public Class Methods
for_school(state, id)
click to toggle source
Returns test and rank data for a specific school.
Attributes¶ ↑
-
state
- Two letter state abbreviation -
id
- Numeric id of a school. ThisGreatSchools
ID is included inother listing requests like +GreatSchools::School#browse+ and +GreatSchools::School#nearby+
# File lib/great_schools/score.rb, line 15 def for_school(state, id) response = GreatSchools::API.get("school/tests/#{state.upcase}/#{id}") new(response) end
Public Instance Methods
rank=(params)
click to toggle source
tests=(params)
click to toggle source
Set an array of GreatSchools::Test
.
Attributes¶ ↑
-
params
- aHash
orArray
ofGreatSchools::Test
attributes.
# File lib/great_schools/score.rb, line 36 def tests=(params) @tests = [] Array.wrap(params).each do |hash| @tests << GreatSchools::Test.new(hash) end @tests end
Also aliased as: test=