Class: GreatSchools::Score
Overview
GreatSchools Score
Instance Attribute Summary collapse
-
#rank ⇒ Object
Returns the value of attribute rank.
-
#school_name ⇒ Object
Returns the value of attribute school_name.
-
#tests ⇒ Object
Returns the value of attribute tests.
Class Method Summary collapse
-
.for_school(state, id) ⇒ Object
Returns test and rank data for a specific school.
Methods inherited from Model
Constructor Details
This class inherits a constructor from GreatSchools::Model
Instance Attribute Details
#rank ⇒ Object
Returns the value of attribute rank.
4 5 6 |
# File 'lib/great_schools/score.rb', line 4 def rank @rank end |
#school_name ⇒ Object
Returns the value of attribute school_name.
4 5 6 |
# File 'lib/great_schools/score.rb', line 4 def school_name @school_name end |
#tests ⇒ Object
Returns the value of attribute tests.
4 5 6 |
# File 'lib/great_schools/score.rb', line 4 def tests @tests end |
Class Method Details
.for_school(state, id) ⇒ Object
Returns test and rank data for a specific school.
Attributes
-
state
- Two letter state abbreviation -
id
- Numeric id of a school. This GreatSchools ID is included inother listing requests like +GreatSchools::School#browse+ and +GreatSchools::School#nearby+
15 16 17 18 19 |
# 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 |