Class: SportsDataApi::Golf::Pairing
- Inherits:
-
Object
- Object
- SportsDataApi::Golf::Pairing
- Defined in:
- lib/sports_data_api/golf/pairing.rb
Instance Attribute Summary collapse
-
#back_nine ⇒ Object
readonly
Returns the value of attribute back_nine.
-
#tee_time ⇒ Object
readonly
Returns the value of attribute tee_time.
Instance Method Summary collapse
-
#initialize(data) ⇒ Pairing
constructor
A new instance of Pairing.
- #players ⇒ Object
Constructor Details
#initialize(data) ⇒ Pairing
Returns a new instance of Pairing.
6 7 8 9 10 |
# File 'lib/sports_data_api/golf/pairing.rb', line 6 def initialize(data) @data = data @tee_time = DateTime.parse(data['tee_time']) if data['tee_time'] @back_nine = data['back_nine'] end |
Instance Attribute Details
#back_nine ⇒ Object (readonly)
Returns the value of attribute back_nine.
4 5 6 |
# File 'lib/sports_data_api/golf/pairing.rb', line 4 def back_nine @back_nine end |
#tee_time ⇒ Object (readonly)
Returns the value of attribute tee_time.
4 5 6 |
# File 'lib/sports_data_api/golf/pairing.rb', line 4 def tee_time @tee_time end |