Class: Extract::Cell

Inherits:
Object show all
Includes:
FromHash
Defined in:
lib/extract/cell.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cellObject

Returns the value of attribute cell.



4
5
6
# File 'lib/extract/cell.rb', line 4

def cell
  @cell
end

#sheet_defObject

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

#colObject



30
31
32
# File 'lib/extract/cell.rb', line 30

def col
  rc[0]
end

#depsObject



11
12
13
# File 'lib/extract/cell.rb', line 11

def deps
  sheet_def.deps(cell)
end

#nameObject



19
20
21
# File 'lib/extract/cell.rb', line 19

def name
  sheet_def.cell_names[cell]
end

#raw_valueObject



15
16
17
# File 'lib/extract/cell.rb', line 15

def raw_value
  sheet_def.raw_value(cell)
end

#rcObject



23
24
25
26
# File 'lib/extract/cell.rb', line 23

def rc
  raise "foo" unless cell =~ /^([A-Z]+)([0-9]+)$/
  [$1,$2]
end

#rowObject



27
28
29
# File 'lib/extract/cell.rb', line 27

def row
  rc[1].to_i
end

#valueObject



6
7
8
9
# File 'lib/extract/cell.rb', line 6

def value
  raise "no sheet def" unless sheet_def
  sheet_def[cell]
end