Class: NFL::LiveUpdate::GameCenter::TeamStat

Inherits:
Object
  • Object
show all
Defined in:
lib/nfl/live_update/game_center/team_stat.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ TeamStat

Returns a new instance of TeamStat.



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 10

def initialize(json)
  @first_downs = json["totfd"]
  @total_yards = json["totyds"]
  @passing_yards = json["pyds"]
  @rushing_yards = json["ryds"]
  @penalties = json["pen"]
  @penalty_yards = json["penyds"]
  @punts = json["pt"]
  @punting_yards = json["ptyds"]
  @punting_average = json["ptavg"]
  @time_of_possession = json["top"]
end

Instance Attribute Details

#first_downsObject

Returns the value of attribute first_downs.



6
7
8
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 6

def first_downs
  @first_downs
end

#passing_yardsObject

Returns the value of attribute passing_yards.



6
7
8
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 6

def passing_yards
  @passing_yards
end

#penaltiesObject

Returns the value of attribute penalties.



6
7
8
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 6

def penalties
  @penalties
end

#penalty_yardsObject

Returns the value of attribute penalty_yards.



6
7
8
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 6

def penalty_yards
  @penalty_yards
end

#punting_averageObject

Returns the value of attribute punting_average.



6
7
8
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 6

def punting_average
  @punting_average
end

#punting_yardsObject

Returns the value of attribute punting_yards.



6
7
8
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 6

def punting_yards
  @punting_yards
end

#puntsObject

Returns the value of attribute punts.



6
7
8
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 6

def punts
  @punts
end

#rushing_yardsObject

Returns the value of attribute rushing_yards.



6
7
8
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 6

def rushing_yards
  @rushing_yards
end

#time_of_possessionObject

Returns the value of attribute time_of_possession.



6
7
8
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 6

def time_of_possession
  @time_of_possession
end

#total_yardsObject

Returns the value of attribute total_yards.



6
7
8
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 6

def total_yards
  @total_yards
end

#turnoversObject

Returns the value of attribute turnovers.



6
7
8
# File 'lib/nfl/live_update/game_center/team_stat.rb', line 6

def turnovers
  @turnovers
end