= About

GuessMethod is the aggressive spell checker for irb. Do you sometimes mistype a method's
name or misspell a constant? GuessMethod can step in and take care of it.

= Usage

<tt>require 'guessmethod'</tt>

Now, you can accidentally call <tt>'1'.toi</tt> and Guess Method will step in and call
<tt>'1'.to_i</tt> like you meant to.

If you accidentally try to access <tt>File::RDWr</tt>, you'll get <tt>File::RDWR</tt> instead.

== Options

<tt>GuessMethod::Options</tt> is a hash with configuration values.

* <code>GuessMethodOptions[:insert_weight]</code>, <code>GuessMethodOptions[:delete_weight]</code>, and <code>GuessMethodOptions[:substitution_weight]</code> change how the levenshtein distance is calculated between method and constant names. The default values are all 1.
* <code>GuessMethodOptions[:threshold]</code> determines what levenshtein distance a method or constant must be within to count as a possible match. Values over 2 can give you unpredictable results, especially for short names. The default value is 2.
* <code>GuessMethodOptions[:max_inspect_length]</code> is, for now, the longest an object's inspect value can be before it's not displayed in messages, and is replaced with simply the standard #<Object:0x142100c>. The default value is 25.
* <code>GuessMethodOptions[:active]</code> determines whether or not GuessMethod does its thing. If set to false (or nil) it'll step aside. Useful for when it gets in the way of something going off correctly (which happens sometimes).

= Warning

This is *not* intended for production.

= Contact

Chris Shea: chris at tie-rack . org