Class: Rbxl::EmptyCell
- Inherits:
-
Object
- Object
- Rbxl::EmptyCell
- Defined in:
- lib/rbxl/empty_cell.rb
Overview
Placeholder cell returned when a coordinate in a padded row has no data.
Used only when ReadOnlyWorksheet#each_row is called with pad_cells: true. The object carries the synthetic coordinate so that downstream code can still locate the slot in the worksheet grid.
cell = Rbxl::EmptyCell.new(coordinate: "C5")
cell.coordinate # => "C5"
cell.value # => nil
Instance Attribute Summary collapse
-
#coordinate ⇒ String
readonly
Excel-style coordinate such as “C5”.
Instance Method Summary collapse
-
#initialize(coordinate:) ⇒ EmptyCell
constructor
A new instance of EmptyCell.
-
#value ⇒ nil
Always
nil; exposed so callers can treat EmptyCell like any other cell object without a type check.
Constructor Details
#initialize(coordinate:) ⇒ EmptyCell
Returns a new instance of EmptyCell.
16 17 18 |
# File 'lib/rbxl/empty_cell.rb', line 16 def initialize(coordinate:) @coordinate = coordinate end |
Instance Attribute Details
#coordinate ⇒ String (readonly)
Returns Excel-style coordinate such as “C5”.
13 14 15 |
# File 'lib/rbxl/empty_cell.rb', line 13 def coordinate @coordinate end |
Instance Method Details
#value ⇒ nil
Always nil; exposed so callers can treat Rbxl::EmptyCell like any other cell object without a type check.
24 25 26 |
# File 'lib/rbxl/empty_cell.rb', line 24 def value nil end |