Class: TableTennis::Row

Inherits:
Array
  • Object
show all
Defined in:
lib/table_tennis/row.rb

Overview

We use this to store each row of data in the table. Row is an array, but with ‘r` too.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(r, values) ⇒ Row

Returns a new instance of Row.



6
7
8
9
# File 'lib/table_tennis/row.rb', line 6

def initialize(r, values)
  super(values)
  @r = r
end

Instance Attribute Details

#rObject (readonly)

r is the index of this row



5
6
7
# File 'lib/table_tennis/row.rb', line 5

def r
  @r
end