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



504
505
506
507
508
509
510
511
512
# File 'opal/opal/corelib/numeric.rb', line 504

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

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