Forum: Ruby Where does one find documentation for Text::Format?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bb4bdf2b184027bc38d4fb529770cde5?d=identicon&s=25 Wes Gamble (weyus)
on 2006-05-18 23:58
I can't find any documentation for Text::Format.

Looks like the code is annotated - how I correctly use ri to view the
documentation?

Wes
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 Austin Ziegler (Guest)
on 2006-05-19 15:40
(Received via mailing list)
On 5/18/06, Wes Gamble <weyus@att.net> wrote:
> I can't find any documentation for Text::Format.
>
> Looks like the code is annotated - how I correctly use ri to view the
> documentation?

You won't find it in ri. The ri database is ... hard to update. If
you've installed by gem, run "gem_server" and view the documentation
there.

-austin
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2006-05-19 19:13
(Received via mailing list)
On May 19, 2006, at 6:37 AM, Austin Ziegler wrote:

> On 5/18/06, Wes Gamble <weyus@att.net> wrote:
>> I can't find any documentation for Text::Format.
>>
>> Looks like the code is annotated - how I correctly use ri to view the
>> documentation?
>
> You won't find it in ri. The ri database is ... hard to update. If
> you've installed by gem, run "gem_server" and view the documentation
> there.

Ruby 1.8 CVS and Rubygems CVS integrate ri data from gems.

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com
34f159f89cbd1d9beac0276f5a7af552?d=identicon&s=25 John Gabriele (Guest)
on 2006-05-19 19:57
(Received via mailing list)
On 5/19/06, Austin Ziegler <halostatue@gmail.com> wrote:
> On 5/18/06, Wes Gamble <weyus@att.net> wrote:
> > I can't find any documentation for Text::Format.
> >
> > Looks like the code is annotated - how I correctly use ri to view the
> > documentation?
>
> You won't find it in ri. The ri database is ... hard to update.

Just curious -- any idea why it is that you need to process a ruby
source file to get a second file (.yaml file) that you may then view
with ri? Why not just wrap the functionality into the ri command and
view the RDoc in the source file directly? That is, make it like
perldoc where you can just run "perldoc ./myfile.pl" and get the docs
instantly.

Is there a real design reason ri is that way, or is it just a quirky
flaw that no one's gotten around to fixing?
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2006-05-19 21:05
(Received via mailing list)
On May 19, 2006, at 10:54 AM, John Gabriele wrote:

> Just curious -- any idea why it is that you need to process a ruby
> source file to get a second file (.yaml file) that you may then view
> with ri? Why not just wrap the functionality into the ri command and
> view the RDoc in the source file directly? That is, make it like
> perldoc where you can just run "perldoc ./myfile.pl" and get the docs
> instantly.
>
> Is there a real design reason ri is that way, or is it just a quirky
> flaw that no one's gotten around to fixing?

A class' functionality may not exist all in one file or may be in
files that aren't installed.  (Time is a good example, part is in C
and part is in a ruby file.)

ri would be unbearably slow if it had to parse the file over and over.

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com
34f159f89cbd1d9beac0276f5a7af552?d=identicon&s=25 John Gabriele (Guest)
on 2006-05-19 22:13
(Received via mailing list)
On 5/19/06, Eric Hodel <drbrain@segment7.net> wrote:
> On May 19, 2006, at 10:54 AM, John Gabriele wrote:
>
> >
> > Is there a real design reason ri is that way, or is it just a quirky
> > flaw that no one's gotten around to fixing?
>
> A class' functionality may not exist all in one file or may be in
> files that aren't installed.  (Time is a good example, part is in C
> and part is in a ruby file.)

Ah. Right. Thank you.
Bb4bdf2b184027bc38d4fb529770cde5?d=identicon&s=25 Wes Gamble (weyus)
on 2006-05-19 23:05
Austin Ziegler wrote:
> On 5/18/06, Wes Gamble <weyus@att.net> wrote:
>> I can't find any documentation for Text::Format.
>>
>> Looks like the code is annotated - how I correctly use ri to view the
>> documentation?
>
> You won't find it in ri. The ri database is ... hard to update. If
> you've installed by gem, run "gem_server" and view the documentation
> there.
>
> -austin

There's no documentation available via gem_server either.

I've installed the gem a few times - I assume gem install text-format is
sufficient.

Is there something that I'm doing wrong?

Thanks,
Wes
Bb4bdf2b184027bc38d4fb529770cde5?d=identicon&s=25 Wes Gamble (weyus)
on 2006-05-19 23:12
Austin Ziegler wrote:
> On 5/18/06, Wes Gamble <weyus@att.net> wrote:
>> I can't find any documentation for Text::Format.
>>
>> Looks like the code is annotated - how I correctly use ri to view the
>> documentation?
>
> You won't find it in ri. The ri database is ... hard to update. If
> you've installed by gem, run "gem_server" and view the documentation
> there.
>
> -austin

I also attempted to go directly into the root dir of the gem and run the
rake task myself to generate the doc but was unable to get it to work.

C:\ruby\lib\ruby\gems\1.8\gems\text-format-1.0.0>rake docs
(in C:/ruby/lib/ruby/gems/1.8/gems/text-format-1.0.0)
rake aborted!
no such file to load -- archive/tar/minitar
C:/ruby/lib/ruby/gems/1.8/gems/text-format-1.0.0/rakefile:7
(See full trace by running task with --trace)

Thanks,
Wes
Bb4bdf2b184027bc38d4fb529770cde5?d=identicon&s=25 Wes Gamble (weyus)
on 2006-05-19 23:15
Last thing I tried was:

C:\eclipse\workspace>gem install -r text-format --rdoc
Attempting remote installation of 'text-format'
Successfully installed text-format-1.0.0
Installing RDoc documentation for text-format-1.0.0...
File not found: c:/ruby/lib/ruby/gems/1.8/doc/text-format-1.0.0/rdoc

WG

Wes Gamble wrote:
> Austin Ziegler wrote:
>> On 5/18/06, Wes Gamble <weyus@att.net> wrote:
>>> I can't find any documentation for Text::Format.
>>>
>>> Looks like the code is annotated - how I correctly use ri to view the
>>> documentation?
>>
>> You won't find it in ri. The ri database is ... hard to update. If
>> you've installed by gem, run "gem_server" and view the documentation
>> there.
>>
>> -austin
>
> I also attempted to go directly into the root dir of the gem and run the
> rake task myself to generate the doc but was unable to get it to work.
>
> C:\ruby\lib\ruby\gems\1.8\gems\text-format-1.0.0>rake docs
> (in C:/ruby/lib/ruby/gems/1.8/gems/text-format-1.0.0)
> rake aborted!
> no such file to load -- archive/tar/minitar
> C:/ruby/lib/ruby/gems/1.8/gems/text-format-1.0.0/rakefile:7
> (See full trace by running task with --trace)
>
> Thanks,
> Wes
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 James Britt (Guest)
on 2006-05-19 23:21
(Received via mailing list)
Wes Gamble wrote:

>
> There's no documentation available via gem_server either.
>
> I've installed the gem a few times - I assume gem install text-format is
> sufficient.
>
> Is there something that I'm doing wrong?

When installing the gem, you may have to pass a switch to tell it to
generate the docs.

 > gem help install
  ...
   -d, --[no-]rdoc  Generate RDoc documentation for the gem on install




--
James Britt

"Design depends largely on constraints."
  - Charles Eames
Bb4bdf2b184027bc38d4fb529770cde5?d=identicon&s=25 Wes Gamble (weyus)
on 2006-05-19 23:24
I generated it myself using "rdoc" and it looks good.

Thanks,
Wes
This topic is locked and can not be replied to.