class SportsDataApi::Golf::Pairing
Attributes
back_nine[R]
data[R]
tee_time[R]
Public Class Methods
new(data)
click to toggle source
# 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
Public Instance Methods
players()
click to toggle source
# File lib/sports_data_api/golf/pairing.rb, line 12 def players @players ||= data.fetch('players', []).map do |json| Player.new(json) end end