class Snake::Presenter::Cell
Constants
- COLOR_APPLE
- COLOR_CLEAR
- COLOR_SNAKE
Attributes
color[RW]
column[R]
grid[R]
row[R]
Public Class Methods
new(grid: ,row: ,column: )
click to toggle source
# File examples/snake/presenter/cell.rb, line 11 def initialize(grid: ,row: ,column: ) @row = row @column = column @grid = grid end
Public Instance Methods
clear()
click to toggle source
# File examples/snake/presenter/cell.rb, line 17 def clear self.color = COLOR_CLEAR unless color == COLOR_CLEAR end
inspect()
click to toggle source
inspect is overridden to prevent printing very long stack traces
# File examples/snake/presenter/cell.rb, line 22 def inspect "#{super[0, 150]}... >" end