A Ruby gem version of the unix 'fortune' program
Ruby Perl
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin
lib
.gitignore
Gemfile
Gemfile.lock
README.textile
fortune_gem.gemspec

README.textile

A ruby version of of the popular unix ‘fortune’ program.
All the fortunes are from the fortune application you can install
in via apt-get install fortune

Usage From an Application

require 'fortune_gem'
FortuneGem.give_fortune

or if you want to limit it to fortunes <= 100…
FortuneGem.give_fortune({:max_length => 100})

Usage From the Command Line

The gem comes with a bin so you can just type ‘fortune_gem’ whenever you want!

$ fortune_gem

Q: How many Marxists does it take to screw in a light bulb?
A: None: The light bulb contains the seeds of its own revolution.

$ fortune_gem 40
You’re at the end of the road again.