Class: SportsDataApi::Golf::Tournament
- Inherits:
-
Object
- Object
- SportsDataApi::Golf::Tournament
- Defined in:
- lib/sports_data_api/golf/tournament.rb
Instance Attribute Summary collapse
-
#course_timezone ⇒ Object
readonly
Returns the value of attribute course_timezone.
-
#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.
-
#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
-
#initialize(tour, year, data) ⇒ Tournament
constructor
A new instance of Tournament.
- #summary ⇒ Object
Constructor Details
#initialize(tour, year, data) ⇒ Tournament
Returns a new instance of Tournament.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/sports_data_api/golf/tournament.rb', line 8 def initialize(tour, year, data) @tour = tour @year = year @id = data['id'] @name = data['name'] @event_type = data['event_type'] @purse = data['purse'] @winning_share = data['winning_share'] @currency = data['currency'] @points = data['points'] @course_timezone = data['course_timezone'] @start_date = Date.parse data['start_date'] @end_date = Date.parse data['end_date'] end |
Instance Attribute Details
#course_timezone ⇒ Object (readonly)
Returns the value of attribute course_timezone.
4 5 6 |
# File 'lib/sports_data_api/golf/tournament.rb', line 4 def course_timezone @course_timezone end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
4 5 6 |
# File 'lib/sports_data_api/golf/tournament.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/tournament.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/tournament.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/tournament.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/tournament.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/tournament.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/tournament.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/tournament.rb', line 4 def start_date @start_date end |
#tour ⇒ Object (readonly)
Returns the value of attribute tour.
4 5 6 |
# File 'lib/sports_data_api/golf/tournament.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/tournament.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/tournament.rb', line 4 def year @year end |