Class: Integer

Inherits:
Numeric show all
Defined in:
opal/opal/corelib/numeric.rb

Class Method Summary collapse

Methods inherited from Numeric

#%, #&, #*, #**, #+, #+@, #-, #-@, #/, #<, #<<, #<=, #<=>, #==, #>, #>=, #>>, #[], #^, #abs, #ceil, #chr, #coerce, #conj, #divmod, #downto, #even?, #finite?, #floor, #gcd, #gcdlcm, #hash, #infinite?, #instance_of?, #integer?, #is_a?, #lcm, #nan?, #negative?, #next, #nonzero?, #odd?, #ord, #positive?, #pred, #round, #send_coerced, #size, #step, #times, #to_f, #to_i, #to_s, #upto, #zero?, #|, #~

Methods included from Comparable

#<, #<=, #==, #>, #>=, #between?, normalize

Class Method Details

.===(other) ⇒ Object



511
512
513
514
515
516
517
518
519
# File 'opal/opal/corelib/numeric.rb', line 511

def self.===(other)
  %x{
    if (!other.$$is_number) {
      return false;
    }

    return (other % 1) === 0;
  }
end