Sha256: 1d5a592e6feb876fde640733b567fe275e7bae679cb5b837fa7ca4500e354ffe

Contents?: true

Size: 1.54 KB

Versions: 2

Compression:

Stored size: 1.54 KB

Contents

# Lazy Man's ri (lookup)

## Installation

Add gemcutter as a source:
   
    sudo gem install gemcutter
    gem tumble
    
Then you'll be able to:

    sudo gem install lookup

## Example usage:

 * `lookup ActiveRecord::Base#new` (returns a single method, since the method name is right)
 * `lookup ActiveRecord::Base#destroy` (returns two methods, since there's two methods with that name)
 * `lookup ActiveRecord::Base#destro` (returns three methods, uses methods beginning with "destroy")
 * `lookup ActiveRecord::Base#d` (tells you to be more specific, because it can't open 35 tabs at once)
 * `lookup ActiveRecord::Base` (returns a single consant)
 * `lookup av::Base` ("av" maps to ActionView, so returns ActionView::Base constant)
 
## Specifying an API

You may specify an API to search in by making the first term either `1.8`, `1.9` or `rails` like this:

 * `lookup 1.9 Array#combination`
 
By default all APIs are searched.
 
## Options

It also takes options:

* `-c or --clear` will delete the database and update the api again. This can take a minute or two.
* `-t or --text` is useful for when you don't want lookup to spam tabs into your browser willy-nilly.

## How it finds them

1. Checks if there's constants/methods with that exact name.
2. Checks if there's constants/methods with names beginning with that name.
3. Does a "fuzzy match" splitting the name and getting anything containing those letters in that order.
4. Opens your browser if you're running a DECENT_OPERATING_SYSTEM (may add support for things other than Mac later on)
5. ???
6. Profit

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lookup-0.4.1 README.md
lookup-0.4.0 README.md