[ANN] IHelp 0.3.0

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>

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

Randy Kramer

···

On Friday 25 February 2005 04:31 pm, Ilmari Heikkinen wrote:

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):

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 :slight_smile:

la, 2005-02-26 kello 19:32, Ilmari Heikkinen kirjoitti:

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 :slight_smile:

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

Releasing 0.3.1 now.

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

···

On Saturday 26 February 2005 07:39 pm, Ilmari Heikkinen wrote:

Releasing 0.3.1 now.

Ilmari,

Ahh, I see--you let a (specified) web browser render the HTML. Clever!

Randy Kramer

···

On Saturday 26 February 2005 09:16 pm, Randy Kramer wrote:

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