class SportsDataApi::Golf::Course
Attributes
data[R]
id[R]
name[R]
par[R]
yardage[R]
Public Class Methods
new(data)
click to toggle source
# 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
Public Instance Methods
pairings()
click to toggle source
# File lib/sports_data_api/golf/course.rb, line 14 def pairings @pairings ||= data.fetch('pairings', []).map do |json| Pairing.new(json) end end