Class: Sheetah::Sheet::Cell

Inherits:
Object
  • Object
show all
Defined in:
lib/sheetah/sheet.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(row:, col:, value:) ⇒ Cell

Returns a new instance of Cell.



82
83
84
85
86
# File 'lib/sheetah/sheet.rb', line 82

def initialize(row:, col:, value:)
  @row = row
  @col = col
  @value = value
end

Instance Attribute Details

#colObject (readonly)

Returns the value of attribute col.



88
89
90
# File 'lib/sheetah/sheet.rb', line 88

def col
  @col
end

#rowObject (readonly)

Returns the value of attribute row.



88
89
90
# File 'lib/sheetah/sheet.rb', line 88

def row
  @row
end

#valueObject (readonly)

Returns the value of attribute value.



88
89
90
# File 'lib/sheetah/sheet.rb', line 88

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



90
91
92
# File 'lib/sheetah/sheet.rb', line 90

def ==(other)
  other.is_a?(self.class) && row == other.row && col == other.col && value == other.value
end