Class: Sports::Standings::StandingsLine

Inherits:
Object
  • Object
show all
Defined in:
lib/sportdb/structs/structs/standings.rb

Overview

nested class StandinsLine - todo/fix: change to Line - why? why not?

Instance Attribute Summary collapse

Instance Method Summary collapse

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/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_drawnObject

Returns the value of attribute away_drawn.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def away_drawn
  @away_drawn
end

#away_goals_againstObject

Returns the value of attribute away_goals_against.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def away_goals_against
  @away_goals_against
end

#away_goals_forObject

Returns the value of attribute away_goals_for.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def away_goals_for
  @away_goals_for
end

#away_lostObject

Returns the value of attribute away_lost.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def away_lost
  @away_lost
end

#away_playedObject

Returns the value of attribute away_played.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def away_played
  @away_played
end

#away_ptsObject

Returns the value of attribute away_pts.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def away_pts
  @away_pts
end

#away_wonObject

Returns the value of attribute away_won.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def away_won
  @away_won
end

#drawnObject

Returns the value of attribute drawn.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def drawn
  @drawn
end

#goals_againstObject

Returns the value of attribute goals_against.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def goals_against
  @goals_against
end

#goals_forObject

Returns the value of attribute goals_for.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def goals_for
  @goals_for
end

#home_drawnObject

Returns the value of attribute home_drawn.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def home_drawn
  @home_drawn
end

#home_goals_againstObject

Returns the value of attribute home_goals_against.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def home_goals_against
  @home_goals_against
end

#home_goals_forObject

Returns the value of attribute home_goals_for.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def home_goals_for
  @home_goals_for
end

#home_lostObject

Returns the value of attribute home_lost.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def home_lost
  @home_lost
end

#home_playedObject

Returns the value of attribute home_played.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def home_played
  @home_played
end

#home_ptsObject

Returns the value of attribute home_pts.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def home_pts
  @home_pts
end

#home_wonObject

Returns the value of attribute home_won.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def home_won
  @home_won
end

#lostObject

Returns the value of attribute lost.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def lost
  @lost
end

#playedObject

Returns the value of attribute played.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def played
  @played
end

#ptsObject

Returns the value of attribute pts.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def pts
  @pts
end

#rankObject Also known as: pos

Returns the value of attribute rank.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def rank
  @rank
end

#teamObject Also known as: team_name

Returns the value of attribute team.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def team
  @team
end

#wonObject

Returns the value of attribute won.



13
14
15
# File 'lib/sportdb/structs/structs/standings.rb', line 13

def won
  @won
end