Class: Tabulard::Table::Cell
- Inherits:
-
Object
- Object
- Tabulard::Table::Cell
- Defined in:
- lib/tabulard/table.rb
Instance Attribute Summary collapse
-
#col ⇒ Object
readonly
Returns the value of attribute col.
-
#row ⇒ Object
readonly
Returns the value of attribute row.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(row:, col:, value:) ⇒ Cell
constructor
A new instance of Cell.
Constructor Details
#initialize(row:, col:, value:) ⇒ Cell
Returns a new instance of Cell.
85 86 87 88 89 |
# File 'lib/tabulard/table.rb', line 85 def initialize(row:, col:, value:) @row = row @col = col @value = value end |
Instance Attribute Details
#col ⇒ Object (readonly)
Returns the value of attribute col.
91 92 93 |
# File 'lib/tabulard/table.rb', line 91 def col @col end |
#row ⇒ Object (readonly)
Returns the value of attribute row.
91 92 93 |
# File 'lib/tabulard/table.rb', line 91 def row @row end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
91 92 93 |
# File 'lib/tabulard/table.rb', line 91 def value @value end |
Instance Method Details
#==(other) ⇒ Object
93 94 95 |
# File 'lib/tabulard/table.rb', line 93 def ==(other) other.is_a?(self.class) && row == other.row && col == other.col && value == other.value end |