Class: SportsDataApi::Golf::Course
- Inherits:
-
Object
- Object
- SportsDataApi::Golf::Course
- Defined in:
- lib/sports_data_api/golf/course.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#par ⇒ Object
readonly
Returns the value of attribute par.
-
#yardage ⇒ Object
readonly
Returns the value of attribute yardage.
Instance Method Summary collapse
-
#initialize(data) ⇒ Course
constructor
A new instance of Course.
- #pairings ⇒ Object
Constructor Details
#initialize(data) ⇒ Course
Returns a new instance of Course.
6 7 8 9 10 11 12 |
# File 'lib/sports_data_api/golf/course.rb', line 6 def initialize(data) @data = data @name = data['name'] @id = data['id'] @yardage = data['yardage'] @par = data['par'] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/sports_data_api/golf/course.rb', line 4 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/sports_data_api/golf/course.rb', line 4 def name @name end |
#par ⇒ Object (readonly)
Returns the value of attribute par.
4 5 6 |
# File 'lib/sports_data_api/golf/course.rb', line 4 def par @par end |
#yardage ⇒ Object (readonly)
Returns the value of attribute yardage.
4 5 6 |
# File 'lib/sports_data_api/golf/course.rb', line 4 def yardage @yardage end |