Class: Infostrada::TableEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/infostrada/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ TableEntry

Returns a new instance of TableEntry.



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/infostrada/table.rb', line 38

def initialize(hash)
  @team_id = hash['n_TeamID']
  @rank = hash['n_RankSort']
  @matches = hash['n_Matches']
  @matches_won = hash['n_MatchesWon']
  @matches_drawn = hash['n_MatchesDrawn']
  @matches_lost = hash['n_MatchesLost']
  @points = hash['n_Points']
  @goals_for = hash['n_GoalsFor']
  @goals_against = hash['n_GoalsAgainst']
end

Instance Attribute Details

#goals_againstObject

Returns the value of attribute goals_against.



36
37
38
# File 'lib/infostrada/table.rb', line 36

def goals_against
  @goals_against
end

#goals_forObject

Returns the value of attribute goals_for.



36
37
38
# File 'lib/infostrada/table.rb', line 36

def goals_for
  @goals_for
end

#matchesObject

Returns the value of attribute matches.



35
36
37
# File 'lib/infostrada/table.rb', line 35

def matches
  @matches
end

#matches_drawnObject

Returns the value of attribute matches_drawn.



35
36
37
# File 'lib/infostrada/table.rb', line 35

def matches_drawn
  @matches_drawn
end

#matches_lostObject

Returns the value of attribute matches_lost.



36
37
38
# File 'lib/infostrada/table.rb', line 36

def matches_lost
  @matches_lost
end

#matches_wonObject

Returns the value of attribute matches_won.



35
36
37
# File 'lib/infostrada/table.rb', line 35

def matches_won
  @matches_won
end

#pointsObject

Returns the value of attribute points.



36
37
38
# File 'lib/infostrada/table.rb', line 36

def points
  @points
end

#rankObject

Returns the value of attribute rank.



35
36
37
# File 'lib/infostrada/table.rb', line 35

def rank
  @rank
end

#team_idObject

Returns the value of attribute team_id.



35
36
37
# File 'lib/infostrada/table.rb', line 35

def team_id
  @team_id
end