Trans
9/18/2008 1:01:00 PM
On Sep 18, 3:27=A0am, Nit Khair <sentinel.2...@gmx.com> wrote:
> Stefano Crocco wrote:
> > It's part of the facets library. Unfortunately, ri doesn't show the nam=
e
>
> Aah, thanks. Yes, I used facets last year...
>
> However, would be grateful if you could tell me how to decide what to
> use in the require statement for a facets class. Whenever i use facets,
> i struggle to figure out the require statement. What is shown in the
> examples often does not work.
It is:
require 'facets/{class|module}/{method_name}'
There are some exceptions where one method is in the same file as
another (eg. write/append), but these are being worked out and should
be almost not existent in another release or two. Even so, require
'facets' hides all that.
> Some while back I came upon ProgressBar. It took me a while of trying to
> figure out the require.
>
> Then Console::ANSICode gives an example: "include Console::ANSICode"
>
> irb(main):011:0> =A0 include Console::ANSICode
> NameError: uninitialized constant Console
> =A0 from (irb):11
It's just
require 'facets/ansicode'
ANSICode
The Console:: namespace has been deprecated. The docs just need to be
fixed.
T.