Class: SK::KCell

Inherits:
KElement show all
Defined in:
lib/kendo.rb

Instance Method Summary collapse

Methods inherited from KElement

#el, #exists?, #html, #initialize, #text

Constructor Details

This class inherits a constructor from SK::KElement

Instance Method Details

#as_numObject



28
29
30
31
32
# File 'lib/kendo.rb', line 28

def as_num
  # trace "cell = #{cell.text}"
  sign = self.text.include?('(') ? -1 : 1
  sign * self.text.gsub(/[$,()]/, '').to_f
end