Library for handling cookie jar files known from 'fortune'
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
tasks
test
.gitignore
CHANGELOG.rdoc
LICENSE
README.rdoc
Rakefile
VERSION
rfortune.gemspec

README.rdoc

rfortune

A Library for handling cookie jar files as known from 'fortune'.

INSTALLATION

The latest development version can be found at GitHub:

github.com/tsujigiri/rfortune

The latest stable version can be installed from Gemcutter:

gem install rfortune

SYNOPSIS:

To instantiate RFortune you have to give the relative path to a cookie jar file as an argument. If there is no argument given or no such file a new one will be created. File paths can be specified relative or absolute or as the name of a file from beneath /usr/share/games/forunes.

cookies = RFortune.new 'cookie_jar_file'

To get a random cookie from the specified file:

cookies.random

To get a random cookie from any of the available Cookie Jar files from beneath /usr/share/games/fortunes:

RFortune.random_fortune

To include offensive fortunes:

RFortune.random_fortune( :offensive => true )

Links

WP: Fortune

Copyright

Copyright © 2009 Helge Rausch. See LICENSE for details.