Class: Furud::Reference
- Inherits:
-
Data
- Object
- Data
- Furud::Reference
- Defined in:
- lib/furud/types.rb,
sig/furud.rbs
Instance Attribute Summary collapse
-
#absolute_column ⇒ Object
readonly
Returns the value of attribute absolute_column.
-
#absolute_row ⇒ Object
readonly
Returns the value of attribute absolute_row.
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#row ⇒ Object
readonly
Returns the value of attribute row.
-
#sheet ⇒ Object
readonly
Returns the value of attribute sheet.
Instance Method Summary collapse
-
#initialize(sheet: nil, row:, column:, absolute_row: false, absolute_column: false) ⇒ Reference
constructor
A new instance of Reference.
- #with ⇒ Reference
Constructor Details
#initialize(sheet: nil, row:, column:, absolute_row: false, absolute_column: false) ⇒ Reference
Returns a new instance of Reference.
5 6 7 8 9 10 |
# File 'lib/furud/types.rb', line 5 def initialize(sheet: nil, row:, column:, absolute_row: false, absolute_column: false) raise ArgumentError, "row and column must be positive" unless row.to_i.positive? && column.to_i.positive? super(sheet: sheet&.to_s, row: Integer(row), column: Integer(column), absolute_row: !!absolute_row, absolute_column: !!absolute_column) end |
Instance Attribute Details
#absolute_column ⇒ Object (readonly)
Returns the value of attribute absolute_column
4 5 6 |
# File 'lib/furud/types.rb', line 4 def absolute_column @absolute_column end |
#absolute_row ⇒ Object (readonly)
Returns the value of attribute absolute_row
4 5 6 |
# File 'lib/furud/types.rb', line 4 def absolute_row @absolute_row end |
#column ⇒ Object (readonly)
Returns the value of attribute column
4 5 6 |
# File 'lib/furud/types.rb', line 4 def column @column end |
#row ⇒ Object (readonly)
Returns the value of attribute row
4 5 6 |
# File 'lib/furud/types.rb', line 4 def row @row end |
#sheet ⇒ Object (readonly)
Returns the value of attribute sheet
4 5 6 |
# File 'lib/furud/types.rb', line 4 def sheet @sheet end |