Class: Fixnum

Inherits:
Integer show all
Defined in:
lib/framework/rational.rb,
lib/framework/builtinME.rb,
lib/framework/builtinME.rb,
lib/framework/rational18.rb,
lib/framework/rationalME.rb,
lib/extensions/rexml/rexml/xpath_parser.rb,
lib/extensions/rhoxml/rexml/xpath_parser.rb

Instance Method Summary collapse

Methods inherited from Integer

#denominator, #downto, #gcd, #gcdlcm, #integer?, #lcm, #next, #numerator, #size, #succ, #to_bn, #to_r, #upto

Methods inherited from Numeric

#abs, #div, #divmod, #floor, #integer?, #modulo, #nonzero?, #remainder, #zero?

Methods included from Comparable

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

Instance Method Details

#dcloneObject



16
# File 'lib/extensions/rexml/rexml/xpath_parser.rb', line 16

def dclone ; self ; end

#is_alpha_numericObject



443
444
445
# File 'lib/framework/builtinME.rb', line 443

def is_alpha_numeric
    return (self>=?0 && self<=?9) || (self>=?a && self<=?z) || (self>=?A && self<=?Z)
end

#quo(other) ⇒ Object Also known as: rdiv

If Rational is defined, returns a Rational number instead of a Fixnum.



488
489
490
# File 'lib/framework/rational18.rb', line 488

def quo(other)
  Rational.new!(self,1) / other
end

#to_iObject



577
578
579
# File 'lib/framework/builtinME.rb', line 577

def to_i
    self
end