Class: SportsDataApi::Golf::Summary
- Inherits:
-
Object
- Object
- SportsDataApi::Golf::Summary
- Defined in:
- lib/sports_data_api/golf/summary.rb
Instance Attribute Summary collapse
-
#course_timezone ⇒ Object
readonly
Returns the value of attribute course_timezone.
-
#coverage ⇒ Object
readonly
Returns the value of attribute coverage.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#end_date ⇒ Object
readonly
Returns the value of attribute end_date.
-
#event_type ⇒ Object
readonly
Returns the value of attribute event_type.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#points ⇒ Object
readonly
Returns the value of attribute points.
-
#purse ⇒ Object
readonly
Returns the value of attribute purse.
-
#start_date ⇒ Object
readonly
Returns the value of attribute start_date.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#tour ⇒ Object
readonly
Returns the value of attribute tour.
-
#winning_share ⇒ Object
readonly
Returns the value of attribute winning_share.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
- #field ⇒ Object
-
#initialize(tour, year, data) ⇒ Summary
constructor
A new instance of Summary.
- #rounds ⇒ Object
Constructor Details
#initialize(tour, year, data) ⇒ Summary
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/sports_data_api/golf/summary.rb', line 8 def initialize(tour, year, data) @tour = tour @year = year @data = data @id = data['id'] @name = data['name'] @purse = data['purse'] @winning_share = data['winning_share'] @currency = data['currency'] @points = data['points'] @event_type = data['event_type'] @start_date = data['start_date'] @end_date = data['end_date'] @course_timezone = data['course_timezone'] @coverage = data['coverage'] @status = data['status'] end |
Instance Attribute Details
#course_timezone ⇒ Object (readonly)
Returns the value of attribute course_timezone.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def course_timezone @course_timezone end |
#coverage ⇒ Object (readonly)
Returns the value of attribute coverage.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def coverage @coverage end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def currency @currency end |
#end_date ⇒ Object (readonly)
Returns the value of attribute end_date.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def end_date @end_date end |
#event_type ⇒ Object (readonly)
Returns the value of attribute event_type.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def event_type @event_type end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.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/summary.rb', line 4 def name @name end |
#points ⇒ Object (readonly)
Returns the value of attribute points.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def points @points end |
#purse ⇒ Object (readonly)
Returns the value of attribute purse.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def purse @purse end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def start_date @start_date end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def status @status end |
#tour ⇒ Object (readonly)
Returns the value of attribute tour.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def tour @tour end |
#winning_share ⇒ Object (readonly)
Returns the value of attribute winning_share.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def winning_share @winning_share end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
4 5 6 |
# File 'lib/sports_data_api/golf/summary.rb', line 4 def year @year end |
Instance Method Details
#field ⇒ Object
26 27 28 29 30 |
# File 'lib/sports_data_api/golf/summary.rb', line 26 def field @field ||= safe_map('field') do |json| SportsDataApi::Golf::Player.new(json) end end |
#rounds ⇒ Object
32 33 34 35 36 |
# File 'lib/sports_data_api/golf/summary.rb', line 32 def rounds @rounds ||= safe_map('rounds') do |json| SportsDataApi::Golf::Round.new(json) end end |