Class: Extract::InlineDef

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rawObject

Returns the value of attribute raw.



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

def raw
  @raw
end

Instance Method Details

#parse_raw_cell(cell) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/extract/inline_def.rb', line 5

def parse_raw_cell(cell)
  if cell == '_'
    nil
  elsif cell =~ /^=/
    cell
  elsif cell =~ /[a-z]/i
    cell
  elsif cell =~ /[0-9]/i
    cell.to_f
  else
    raise "dunno"
  end
end