Class: VeryGood::Cell
- Inherits:
-
Object
- Object
- VeryGood::Cell
- Defined in:
- lib/very_good/cell.rb
Instance Attribute Summary collapse
-
#char ⇒ Object
readonly
Returns the value of attribute char.
-
#colour ⇒ Object
readonly
Returns the value of attribute colour.
Instance Method Summary collapse
-
#initialize(char, colour: nil) ⇒ Cell
constructor
A new instance of Cell.
Constructor Details
#initialize(char, colour: nil) ⇒ Cell
Returns a new instance of Cell.
3 4 5 6 |
# File 'lib/very_good/cell.rb', line 3 def initialize(char, colour: nil) @char = char @colour = colour end |
Instance Attribute Details
#char ⇒ Object (readonly)
Returns the value of attribute char.
8 9 10 |
# File 'lib/very_good/cell.rb', line 8 def char @char end |
#colour ⇒ Object (readonly)
Returns the value of attribute colour.
8 9 10 |
# File 'lib/very_good/cell.rb', line 8 def colour @colour end |