Class: SpielplanSaar::TableEntry

Inherits:
Struct
  • Object
show all
Defined in:
lib/spielplan_saar/table_entry.rb,
lib/spielplan_saar/table_entry.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#differenceObject

Returns the value of attribute difference

Returns:

  • (Object)

    the current value of difference



2
3
4
# File 'lib/spielplan_saar/table_entry.rb', line 2

def difference
  @difference
end

#gamesObject

Returns the value of attribute games

Returns:

  • (Object)

    the current value of games



2
3
4
# File 'lib/spielplan_saar/table_entry.rb', line 2

def games
  @games
end

#goalsObject

Returns the value of attribute goals

Returns:

  • (Object)

    the current value of goals



2
3
4
# File 'lib/spielplan_saar/table_entry.rb', line 2

def goals
  @goals
end

#pointsObject

Returns the value of attribute points

Returns:

  • (Object)

    the current value of points



2
3
4
# File 'lib/spielplan_saar/table_entry.rb', line 2

def points
  @points
end

#positionObject

Returns the value of attribute position

Returns:

  • (Object)

    the current value of position



2
3
4
# File 'lib/spielplan_saar/table_entry.rb', line 2

def position
  @position
end

#teamObject

Returns the value of attribute team

Returns:

  • (Object)

    the current value of team



2
3
4
# File 'lib/spielplan_saar/table_entry.rb', line 2

def team
  @team
end

Class Method Details

.parse(row_node) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/spielplan_saar/table_entry.rb', line 6

def self.parse(row_node)
  position = inner_text_at_position(row_node, 1)
  team =  inner_text_at_position(row_node, 2)
  games = inner_text_at_position(row_node, 3)
  points = inner_text_at_position(row_node, 4)
  goals = inner_text_at_position(row_node, 5)
  difference = inner_text_at_position(row_node, 6)

  self.new(position, team, games, points, goals, difference)
end