Hi,
Suppose I want to get an info from ri about Integers.
In a code I found
17.step(self,2)
and I would like to ask ri about this construct.
I typed
ri Integer
and got
----------------------------------------------- Class: Integer < Numeric
+Integer+ is the basis for the two concrete classes that hold whole
numbers, +Bignum+ and +Fixnum+.
···
------------------------------------------------------------------------
Includes:
---------
Precision(prec, prec_f, prec_i)
Class methods:
--------------
induced_from
Instance methods:
-----------------
ceil, chr, downto, floor, integer?, next, round, succ, times, to_i,
to_int, truncate, upto
there is nothing mentioned about "step"...so I did something wrong
here.
So...what should I feed into ri to get an appropiate answer.
("step" is only an example...)
Have a nice and ruby day!
Meino
In this case, you'd have to dig a little further. The first line says Integer < Numeric, so you have to look at its base class, Numeric. You'll find step in there.
Also, you can just type `ri step`. You'll get the following returned:
More than one method matched your request. You can refine
your search by asking for information on one of:
Date#step, Numeric#step, Range#step
You can then `ri Numeric#step` to find out the details.
HTH,
Devin
(see?)
Meino Christian Cramer wrote:
···
Hi,
Suppose I want to get an info from ri about Integers.
In a code I found
17.step(self,2)
and I would like to ask ri about this construct.
I typed
ri Integer
and got
----------------------------------------------- Class: Integer < Numeric
+Integer+ is the basis for the two concrete classes that hold whole
numbers, +Bignum+ and +Fixnum+.
------------------------------------------------------------------------
---------
Precision(prec, prec_f, prec_i)
--------------
induced_from
-----------------
ceil, chr, downto, floor, integer?, next, round, succ, times, to_i,
to_int, truncate, upto
there is nothing mentioned about "step"...so I did something wrong
here.
So...what should I feed into ri to get an appropiate answer.
("step" is only an example...)
Have a nice and ruby day!
Meino
Oh yeah! :O) Thanks a lot! That clearifies my Sunday! :)))
Have a nice and ruby day!
Meino
···
From: Devin Mullins <twifkak@comcast.net>
Subject: Re: RubyNuby Q: Howto Ri
Date: Sun, 26 Jun 2005 16:49:56 +0900
In this case, you'd have to dig a little further. The first line says
Integer < Numeric, so you have to look at its base class, Numeric.
You'll find step in there.
Also, you can just type `ri step`. You'll get the following returned:
More than one method matched your request. You can refine
your search by asking for information on one of:
Date#step, Numeric#step, Range#step
You can then `ri Numeric#step` to find out the details.
HTH,
Devin
(see?)
Meino Christian Cramer wrote:
>Hi,
>
> Suppose I want to get an info from ri about Integers.
>
> In a code I found
>
> 17.step(self,2)
>
> and I would like to ask ri about this construct.
>
> I typed
>
> ri Integer
>
> and got
>
> ----------------------------------------------- Class: Integer < Numeric
> +Integer+ is the basis for the two concrete classes that hold whole
> numbers, +Bignum+ and +Fixnum+.
>
> ------------------------------------------------------------------------
>
>
> Includes:
> ---------
> Precision(prec, prec_f, prec_i)
>
>
> Class methods:
> --------------
> induced_from
>
>
> Instance methods:
> -----------------
> ceil, chr, downto, floor, integer?, next, round, succ, times, to_i,
> to_int, truncate, upto
>
>
> there is nothing mentioned about "step"...so I did something wrong
> here.
>
> So...what should I feed into ri to get an appropiate answer.
> ("step" is only an example...)
>
> Have a nice and ruby day!
> Meino
>
>
>
>
>