Class: Golumn::ArrayGrid

Inherits:
WX::GridTable
  • Object
show all
Defined in:
lib/golumn/array_grid.rb

Overview

main app

Instance Method Summary collapse

Constructor Details

#initialize(data:) ⇒ ArrayGrid

Returns a new instance of ArrayGrid.



6
7
8
# File 'lib/golumn/array_grid.rb', line 6

def initialize(data:)
  @data = data
end

Instance Method Details

#[](i, j) ⇒ Object



18
19
20
# File 'lib/golumn/array_grid.rb', line 18

def [](i, j)
  @data[i][j]
end

#[]=(i, j, value) ⇒ Object



22
23
24
# File 'lib/golumn/array_grid.rb', line 22

def []=(i, j, value)
  @data[i][j] = value
end

#colsObject



14
15
16
# File 'lib/golumn/array_grid.rb', line 14

def cols
  @data.first.size
end

#rowsObject



10
11
12
# File 'lib/golumn/array_grid.rb', line 10

def rows
  @data.size
end

#typename(*_) ⇒ Object



26
27
28
# File 'lib/golumn/array_grid.rb', line 26

def typename(*_)
  :string
end