Class: Golumn::ArrayGrid
- Inherits:
-
WX::GridTable
- Object
- WX::GridTable
- Golumn::ArrayGrid
- Defined in:
- lib/golumn/array_grid.rb
Overview
main app
Instance Method Summary collapse
- #[](i, j) ⇒ Object
- #[]=(i, j, value) ⇒ Object
- #cols ⇒ Object
-
#initialize(data:) ⇒ ArrayGrid
constructor
A new instance of ArrayGrid.
- #rows ⇒ Object
- #typename(*_) ⇒ Object
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 |
#cols ⇒ Object
14 15 16 |
# File 'lib/golumn/array_grid.rb', line 14 def cols @data.first.size end |
#rows ⇒ Object
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 |