Website hosting service by Active-Venture.com
 

 Back to Index

prev - up - next - index

Numeric

Numeric is the abstract class for the numbers.

SuperClass:

Object

Included Modules:

Comparable

Methods:

+ self

Returns self.

- self

Returns negation of self.

self <=> other

Returns -1, 0, or 1 depending on whether the left argument is numerically less than, equal to, or greater than the right argument.

abs

Returns absolute value of self.

chr

Returns the string that contains the character represented by that Integer(self) in the ASCII character set. For example, 65.chr is "A".

coerce(number)

Converts self and the number into mutually calculatable numbers.

divmod(other)

Returns a pair of the quotient and remainder by other.

integer?

Returns true if the receiver is integer.

nonzero?

Returns false on zero, the self otherwise.

to_f

Converts self into a floating-point number.

to_i

Returns an integer converted from self.

zero?

Returns true on zero.


prev - up - next - index

matz@netlab.co.jp

 

  

 

 

2002-2004 Active-Venture.com Website Hosting Service

 
Buy domain name at only $5.95/yr with comprehensive domain hosting services. Domain registration and domain search service from $5.95 Cheap domain name registration and domain transfer service
 

Disclaimer: This documentation is provided only for the benefits of our website hosting customers.
For authoritative source of the documentation, please refer to http://www.ruby-doc.org/docs/