Class: RbSnake::Models::Grid
- Inherits:
-
Object
- Object
- RbSnake::Models::Grid
- Defined in:
- lib/rb_snake/models/grid.rb
Instance Attribute Summary collapse
-
#cols ⇒ Object
readonly
Returns the value of attribute cols.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
Instance Method Summary collapse
-
#initialize(rows:, cols:) ⇒ Grid
constructor
A new instance of Grid.
Constructor Details
#initialize(rows:, cols:) ⇒ Grid
Returns a new instance of Grid.
8 9 10 11 |
# File 'lib/rb_snake/models/grid.rb', line 8 def initialize(rows:, cols:) @rows = rows @cols = cols end |
Instance Attribute Details
#cols ⇒ Object (readonly)
Returns the value of attribute cols.
6 7 8 |
# File 'lib/rb_snake/models/grid.rb', line 6 def cols @cols end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
6 7 8 |
# File 'lib/rb_snake/models/grid.rb', line 6 def rows @rows end |