Class: Sports::Standings::StandingsLine
- Inherits:
-
Object
- Object
- Sports::Standings::StandingsLine
- Defined in:
- lib/sportdb/structs/standings.rb
Overview
nested class StandinsLine - todo/fix: change to Line - why? why not?
Instance Attribute Summary collapse
-
#away_drawn ⇒ Object
Returns the value of attribute away_drawn.
-
#away_goals_against ⇒ Object
Returns the value of attribute away_goals_against.
-
#away_goals_for ⇒ Object
Returns the value of attribute away_goals_for.
-
#away_lost ⇒ Object
Returns the value of attribute away_lost.
-
#away_played ⇒ Object
Returns the value of attribute away_played.
-
#away_pts ⇒ Object
Returns the value of attribute away_pts.
-
#away_won ⇒ Object
Returns the value of attribute away_won.
-
#drawn ⇒ Object
Returns the value of attribute drawn.
-
#goals_against ⇒ Object
Returns the value of attribute goals_against.
-
#goals_for ⇒ Object
Returns the value of attribute goals_for.
-
#home_drawn ⇒ Object
Returns the value of attribute home_drawn.
-
#home_goals_against ⇒ Object
Returns the value of attribute home_goals_against.
-
#home_goals_for ⇒ Object
Returns the value of attribute home_goals_for.
-
#home_lost ⇒ Object
Returns the value of attribute home_lost.
-
#home_played ⇒ Object
Returns the value of attribute home_played.
-
#home_pts ⇒ Object
Returns the value of attribute home_pts.
-
#home_won ⇒ Object
Returns the value of attribute home_won.
-
#lost ⇒ Object
Returns the value of attribute lost.
-
#played ⇒ Object
Returns the value of attribute played.
-
#pts ⇒ Object
Returns the value of attribute pts.
-
#rank ⇒ Object
(also: #pos)
Returns the value of attribute rank.
-
#team ⇒ Object
(also: #team_name)
Returns the value of attribute team.
-
#won ⇒ Object
Returns the value of attribute won.
Instance Method Summary collapse
-
#initialize(team) ⇒ StandingsLine
constructor
A new instance of StandingsLine.
Constructor Details
#initialize(team) ⇒ StandingsLine
Returns a new instance of StandingsLine.
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/sportdb/structs/standings.rb', line 25 def initialize( team ) @rank = nil # use 0? why? why not? ## change rank back to pos - why? why not? @team = team @played = @home_played = @away_played = 0 @won = @home_won = @away_won = 0 @lost = @home_lost = @away_lost = 0 @drawn = @home_drawn = @away_drawn = 0 @goals_for = @home_goals_for = @away_goals_for = 0 @goals_against = @home_goals_against = @away_goals_against = 0 @pts = @home_pts = @away_pts = 0 end |
Instance Attribute Details
#away_drawn ⇒ Object
Returns the value of attribute away_drawn.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def away_drawn @away_drawn end |
#away_goals_against ⇒ Object
Returns the value of attribute away_goals_against.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def away_goals_against @away_goals_against end |
#away_goals_for ⇒ Object
Returns the value of attribute away_goals_for.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def away_goals_for @away_goals_for end |
#away_lost ⇒ Object
Returns the value of attribute away_lost.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def away_lost @away_lost end |
#away_played ⇒ Object
Returns the value of attribute away_played.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def away_played @away_played end |
#away_pts ⇒ Object
Returns the value of attribute away_pts.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def away_pts @away_pts end |
#away_won ⇒ Object
Returns the value of attribute away_won.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def away_won @away_won end |
#drawn ⇒ Object
Returns the value of attribute drawn.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def drawn @drawn end |
#goals_against ⇒ Object
Returns the value of attribute goals_against.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def goals_against @goals_against end |
#goals_for ⇒ Object
Returns the value of attribute goals_for.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def goals_for @goals_for end |
#home_drawn ⇒ Object
Returns the value of attribute home_drawn.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def home_drawn @home_drawn end |
#home_goals_against ⇒ Object
Returns the value of attribute home_goals_against.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def home_goals_against @home_goals_against end |
#home_goals_for ⇒ Object
Returns the value of attribute home_goals_for.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def home_goals_for @home_goals_for end |
#home_lost ⇒ Object
Returns the value of attribute home_lost.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def home_lost @home_lost end |
#home_played ⇒ Object
Returns the value of attribute home_played.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def home_played @home_played end |
#home_pts ⇒ Object
Returns the value of attribute home_pts.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def home_pts @home_pts end |
#home_won ⇒ Object
Returns the value of attribute home_won.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def home_won @home_won end |
#lost ⇒ Object
Returns the value of attribute lost.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def lost @lost end |
#played ⇒ Object
Returns the value of attribute played.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def played @played end |
#pts ⇒ Object
Returns the value of attribute pts.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def pts @pts end |
#rank ⇒ Object Also known as: pos
Returns the value of attribute rank.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def rank @rank end |
#team ⇒ Object Also known as: team_name
Returns the value of attribute team.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def team @team end |
#won ⇒ Object
Returns the value of attribute won.
13 14 15 |
# File 'lib/sportdb/structs/standings.rb', line 13 def won @won end |