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.
Wes G. (Guest)
on 2006-05-19 01: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
Austin Z. (Guest)
on 2006-05-19 17:40
(Received via mailing list)
On 5/18/06, Wes G. <removed_email_address@domain.invalid> 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
Eric H. (Guest)
on 2006-05-19 21:13
(Received via mailing list)
On May 19, 2006, at 6:37 AM, Austin Z. wrote:

> On 5/18/06, Wes G. <removed_email_address@domain.invalid> 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 H. - removed_email_address@domain.invalid - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com
John G. (Guest)
on 2006-05-19 21:57
(Received via mailing list)
On 5/19/06, Austin Z. <removed_email_address@domain.invalid> wrote:
> On 5/18/06, Wes G. <removed_email_address@domain.invalid> 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?
Eric H. (Guest)
on 2006-05-19 23:05
(Received via mailing list)
On May 19, 2006, at 10:54 AM, John G. 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 H. - removed_email_address@domain.invalid - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com
John G. (Guest)
on 2006-05-20 00:13
(Received via mailing list)
On 5/19/06, Eric H. <removed_email_address@domain.invalid> wrote:
> On May 19, 2006, at 10:54 AM, John G. 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.
Wes G. (Guest)
on 2006-05-20 01:05
Austin Z. wrote:
> On 5/18/06, Wes G. <removed_email_address@domain.invalid> 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
Wes G. (Guest)
on 2006-05-20 01:12
Austin Z. wrote:
> On 5/18/06, Wes G. <removed_email_address@domain.invalid> 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
Wes G. (Guest)
on 2006-05-20 01: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 G. wrote:
> Austin Z. wrote:
>> On 5/18/06, Wes G. <removed_email_address@domain.invalid> 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
James B. (Guest)
on 2006-05-20 01:21
(Received via mailing list)
Wes G. 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 B.

"Design depends largely on constraints."
  - Charles Eames
Wes G. (Guest)
on 2006-05-20 01:24
I generated it myself using "rdoc" and it looks good.

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