Class: Extract::Cell
Instance Attribute Summary collapse
-
#cell ⇒ Object
Returns the value of attribute cell.
-
#sheet_def ⇒ Object
Returns the value of attribute sheet_def.
Instance Method Summary collapse
- #col ⇒ Object
- #deps ⇒ Object
- #name ⇒ Object
- #raw_value ⇒ Object
- #rc ⇒ Object
- #row ⇒ Object
- #value ⇒ Object
Instance Attribute Details
#cell ⇒ Object
Returns the value of attribute cell.
4 5 6 |
# File 'lib/extract/cell.rb', line 4 def cell @cell end |
#sheet_def ⇒ Object
Returns the value of attribute sheet_def.
4 5 6 |
# File 'lib/extract/cell.rb', line 4 def sheet_def @sheet_def end |
Instance Method Details
#col ⇒ Object
30 31 32 |
# File 'lib/extract/cell.rb', line 30 def col rc[0] end |
#deps ⇒ Object
11 12 13 |
# File 'lib/extract/cell.rb', line 11 def deps sheet_def.deps(cell) end |
#name ⇒ Object
19 20 21 |
# File 'lib/extract/cell.rb', line 19 def name sheet_def.cell_names[cell] end |
#raw_value ⇒ Object
15 16 17 |
# File 'lib/extract/cell.rb', line 15 def raw_value sheet_def.raw_value(cell) end |
#rc ⇒ Object
23 24 25 26 |
# File 'lib/extract/cell.rb', line 23 def rc raise "foo" unless cell =~ /^([A-Z]+)([0-9]+)$/ [$1,$2] end |
#row ⇒ Object
27 28 29 |
# File 'lib/extract/cell.rb', line 27 def row rc[1].to_i end |
#value ⇒ Object
6 7 8 9 |
# File 'lib/extract/cell.rb', line 6 def value raise "no sheet def" unless sheet_def sheet_def[cell] end |