Class: Lionel::ProxyWorksheet

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/lionel/proxy_worksheet.rb

Constant Summary collapse

HEADER_ROW =
1

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(worksheet) ⇒ ProxyWorksheet

Returns a new instance of ProxyWorksheet.



9
10
11
# File 'lib/lionel/proxy_worksheet.rb', line 9

def initialize(worksheet)
  @worksheet = worksheet
end

Instance Attribute Details

#worksheetObject (readonly)

Returns the value of attribute worksheet.



8
9
10
# File 'lib/lionel/proxy_worksheet.rb', line 8

def worksheet
  @worksheet
end

Instance Method Details

#[](col, row) ⇒ Object



17
18
19
# File 'lib/lionel/proxy_worksheet.rb', line 17

def [](col, row)
  worksheet["#{col}#{row}"]
end

#[]=(col, row, value) ⇒ Object



13
14
15
# File 'lib/lionel/proxy_worksheet.rb', line 13

def []=(col, row, value)
  worksheet["#{col}#{row}"] = value
end

#content_rowsObject



22
23
24
# File 'lib/lionel/proxy_worksheet.rb', line 22

def content_rows
  rows(HEADER_ROW)
end