Sha256: f3c82beacac59c3f4409a6eb428337c64e3ab316ee714b1f32f915876ecd56fb

Contents?: true

Size: 1.3 KB

Versions: 11

Compression:

Stored size: 1.3 KB

Contents

# Haiku Gadget

Generate random haikus!

Uses an algorithm, a custom dictionary, some grammar rules, and a team of hamsters running in wheels.

### Play with it at [haikugadget.com](http://www.haikugadget.com/)

## What is a haiku?

A short poem consisting of three lines:

    five syllables here
    then seven syllables here
    then five syllables

## Installation

Add this line to your application's Gemfile:

    gem 'haiku_gadget'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install haiku_gadget

## Usage

First, turn on the gadget:

    require 'haiku_gadget'

Get a random haiku as an array of three lines:

    HaikuGadget.haiku

Or pass in a delimiter, which will return the haiku as a single string:

    HaikuGadget.haiku ' / '

To get a single random line, try one of these methods:

    HaikuGadget.top_line
    HaikuGadget.middle_line
    HaikuGadget.bottom_line

Or specify the line you want by an index:

    HaikuGadget.random_line 0
    HaikuGadget.random_line 1
    HaikuGadget.random_line 2

## Contributing

1. Fork it ( http://github.com/zenblender/haiku_gadget/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
haiku_gadget-1.0.12 README.md
haiku_gadget-1.0.11 README.md
haiku_gadget-1.0.10 README.md
haiku_gadget-1.0.9 README.md
haiku_gadget-1.0.8 README.md
haiku_gadget-1.0.7 README.md
haiku_gadget-1.0.6 README.md
haiku_gadget-1.0.5 README.md
haiku_gadget-1.0.4 README.md
haiku_gadget-1.0.3 README.md
haiku_gadget-1.0.2 README.md