Class: NSCFNumber

Inherits:
Object
  • Object
show all
Defined in:
lib/ichabod/coercion.rb

Overview

Help convert objects WebKit’s JS returns into things we can use

Instance Method Summary collapse

Instance Method Details

#inspectObject



4
5
6
7
8
9
10
# File 'lib/ichabod/coercion.rb', line 4

def inspect
  if Integer(self) == Float(self)
    Integer(self).to_s
  else
    Float(self).to_s
  end
end