Class: Sportradar::Api::Football::Nfl::DepthChart
- Includes:
- Enumerable
- Defined in:
- lib/sportradar/api/football/nfl/depth_chart.rb
Instance Attribute Summary collapse
-
#chart ⇒ Object
Returns the value of attribute chart.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(data) ⇒ DepthChart
constructor
A new instance of DepthChart.
- #team(number) ⇒ Object
Methods inherited from Data
#all_attributes, #attributes, #create_data, #parse_into_array, #parse_into_array_with_options, #parse_out_hashes, #structure_links, #update_data
Constructor Details
#initialize(data) ⇒ DepthChart
Returns a new instance of DepthChart.
9 10 11 |
# File 'lib/sportradar/api/football/nfl/depth_chart.rb', line 9 def initialize(data) generate_chart(data) end |
Instance Attribute Details
#chart ⇒ Object
Returns the value of attribute chart.
7 8 9 |
# File 'lib/sportradar/api/football/nfl/depth_chart.rb', line 7 def chart @chart end |
#response ⇒ Object
Returns the value of attribute response.
7 8 9 |
# File 'lib/sportradar/api/football/nfl/depth_chart.rb', line 7 def response @response end |
Instance Method Details
#each ⇒ Object
17 18 19 20 |
# File 'lib/sportradar/api/football/nfl/depth_chart.rb', line 17 def each populate_teams teams.each { |team| yield team } end |
#team(number) ⇒ Object
13 14 15 |
# File 'lib/sportradar/api/football/nfl/depth_chart.rb', line 13 def team(number) teams[number] end |