[ANN] IHelp 0.3.0

I

Ilmari Heikkinen

Announcing the release of IHelp 0.3.0.

http://fhtr.org/projects/ihelp/
http://fhtr.org/projects/ihelp/doc/
http://fhtr.org/projects/ihelp/releases/ihelp-0.3.0.tar.gz

This release brings with it custom help renderers, which you can
leverage to render help whenever you want, wherever you want and however
you want.

Also included are a couple experimental renderers (no guarantees):

- #rubydoc_org opens the corresponding ruby-doc.org class help file
using the program defined in IHelp::WWW_BROWSER

- #rubytoruby_src uses Ryan Davis' RubyToRuby class to print out the
source for the method.
http://blog.zenspider.com/archives/2005/02/rubytoruby.html for more info
about RubyToRuby.

These can be used by setting the renderer-attribute to the name of the
renderer method, e.g. IHelp.renderer = :rubydoc_org. The default
renderer is :ri.

--
Ilmari Heikkinen


====

Ri bindings for interactive use from within Ruby.
Does a bit of second-guessing (Instance method? Class method?
Try both unless explicitly defined. Not found in this class? Try the
ancestor classes.)

Goal is that help is given for all methods that have help.

Examples:

require 'ihelp'

a = "string"
a.help
a.help :reverse
a.help :map
String.help
String.help :new
String.help :reverse
String.help :map
String.instance_help :reverse
String.instance_help :new # => No help found.
a.help :new
help "String#reverse"
help "String.reverse"
a.method:)reverse).help # gets help for Method
help "Hash#map"

Custom help renderers:

The help-method calls IHelp::Renderer's method defined by
IHelp.renderer with the RI info object. You can print help
out the way you want by defining your own renderer method
in IHelp::Renderer and setting IHelp.renderer to the name
of the method.

Example:

require 'ihelp'

class IHelp::Renderer
def print_name(info)
puts info.full_name
end
end

IHelp.renderer = :print_name

[1,2,3].help:reject
# Array#reject
# => nil

License: Ruby's
Author: Ilmari Heikkinen <kig misfiring net>
 
R

Randy Kramer

This release brings with it custom help renderers, which you can
leverage to render help whenever you want, wherever you want and however
you want.

Also included are a couple experimental renderers (no guarantees):

Does help use HTML? (In other words, do any of the help renderers render
HTML?)

Randy Kramer
 
I

Ilmari Heikkinen

la, 2005-02-26 kello 16:54, Randy Kramer kirjoitti:
Does help use HTML? (In other words, do any of the help renderers render
HTML?)

Randy Kramer

Nope, but it's doable. If anyone knows a good way to turn
RI::MethodDescription & RI::ClassDescription into HTML, speak up :)
 
I

Ilmari Heikkinen

la, 2005-02-26 kello 19:32, Ilmari Heikkinen kirjoitti:
la, 2005-02-26 kello 16:54, Randy Kramer kirjoitti:


Nope, but it's doable. If anyone knows a good way to turn
RI::MethodDescription & RI::ClassDescription into HTML, speak up :)

Made the html renderer, added a help_html -method too. And fixed some
bugs.

Releasing 0.3.1 now.
 
R

Randy Kramer

Made the html renderer, added a help_html -method too. And fixed some
bugs.

Ilmari,

Wow, thanks! Downloading now, will take a look.

regards,
Randy Kramer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top