Class: Rrxcell::Sheet
- Inherits:
-
Object
- Object
- Rrxcell::Sheet
- Defined in:
- lib/rrxcell/sheet.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#book ⇒ Object
readonly
Returns the value of attribute book.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
- #[](row_position) ⇒ Object
- #address(cell_address) ⇒ Object
-
#initialize(book, position) ⇒ Sheet
constructor
A new instance of Sheet.
- #name ⇒ Object
- #object ⇒ Object
- #row(row_position) ⇒ Object
Constructor Details
#initialize(book, position) ⇒ Sheet
Returns a new instance of Sheet.
4 5 6 7 8 |
# File 'lib/rrxcell/sheet.rb', line 4 def initialize(book, position) super() @book = book @position = position end |
Instance Attribute Details
#book ⇒ Object (readonly)
Returns the value of attribute book.
2 3 4 |
# File 'lib/rrxcell/sheet.rb', line 2 def book @book end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
2 3 4 |
# File 'lib/rrxcell/sheet.rb', line 2 def position @position end |
Instance Method Details
#[](row_position) ⇒ Object
10 11 12 |
# File 'lib/rrxcell/sheet.rb', line 10 def [](row_position) row(row_position) end |
#address(cell_address) ⇒ Object
14 15 16 17 18 |
# File 'lib/rrxcell/sheet.rb', line 14 def address(cell_address) row_position, column_position = Rrxcell::Addressing.cell_address_to_row_column_position(cell_address) row(row_position).column(column_position) end |
#name ⇒ Object
20 21 22 |
# File 'lib/rrxcell/sheet.rb', line 20 def name book.sheet_names[position] end |
#object ⇒ Object
24 25 26 |
# File 'lib/rrxcell/sheet.rb', line 24 def object raise ShouldBeImplementedError end |
#row(row_position) ⇒ Object
28 29 30 |
# File 'lib/rrxcell/sheet.rb', line 28 def row(row_position) raise ShouldBeImplementedError end |