Class: ExactCover::ColumnObject
- Inherits:
-
DataObject
- Object
- DataObject
- ExactCover::ColumnObject
- Defined in:
- lib/exact_cover/column_object.rb
Overview
a column header
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
name.
-
#size ⇒ Object
size (number of 1 in the column).
Attributes inherited from DataObject
#column, #down, #left, #right, #up
Instance Method Summary collapse
-
#initialize(size, name) ⇒ ColumnObject
constructor
A new instance of ColumnObject.
Constructor Details
#initialize(size, name) ⇒ ColumnObject
Returns a new instance of ColumnObject.
7 8 9 10 11 12 |
# File 'lib/exact_cover/column_object.rb', line 7 def initialize(size, name) super(nil) @size = size @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
name
5 6 7 |
# File 'lib/exact_cover/column_object.rb', line 5 def name @name end |
#size ⇒ Object
size (number of 1 in the column)
4 5 6 |
# File 'lib/exact_cover/column_object.rb', line 4 def size @size end |