Class: Numeric

Inherits:
Object show all
Defined in:
opal/stdlib/json.rb,
opal/stdlib/native.rb

Direct Known Subclasses

BigDecimal, Date::Infinity

Instance Method Summary collapse

Instance Method Details

#to_jsonObject



183
184
185
# File 'opal/stdlib/json.rb', line 183

def to_json
  `self.toString()`
end

#to_nObject

Returns the internal JavaScript value (with valueOf).

Returns:

  • the internal JavaScript value (with valueOf).



442
443
444
# File 'opal/stdlib/native.rb', line 442

def to_n
  `self.valueOf()`
end