Class: Cloudsheet::Sheet
- Inherits:
-
Object
- Object
- Cloudsheet::Sheet
- Defined in:
- lib/cloudsheet/sheet.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#raw_sheet ⇒ Object
readonly
Returns the value of attribute raw_sheet.
-
#workbook ⇒ Object
readonly
Returns the value of attribute workbook.
Instance Method Summary collapse
Instance Attribute Details
#raw_sheet ⇒ Object (readonly)
Returns the value of attribute raw_sheet.
7 8 9 |
# File 'lib/cloudsheet/sheet.rb', line 7 def raw_sheet @raw_sheet end |
#workbook ⇒ Object (readonly)
Returns the value of attribute workbook.
7 8 9 |
# File 'lib/cloudsheet/sheet.rb', line 7 def workbook @workbook end |
Instance Method Details
#each ⇒ Object
14 15 16 17 18 |
# File 'lib/cloudsheet/sheet.rb', line 14 def each rows.each do |r| yield Row.parse(r, @map) end end |
#map(m) ⇒ Object
9 10 11 12 |
# File 'lib/cloudsheet/sheet.rb', line 9 def map(m) @map = m self end |
#rows ⇒ Object
20 21 22 |
# File 'lib/cloudsheet/sheet.rb', line 20 def rows @raw_sheet.rows end |
#sheet(num) ⇒ Object
24 25 26 27 |
# File 'lib/cloudsheet/sheet.rb', line 24 def sheet(num) @raw_sheet = @workbook[num] self end |