Class: NSCFNumber

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#inspectObject



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

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