Skip to content
A Ruby gem version of the unix 'fortune' program
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Update to Rubygems best practices Oct 6, 2016
exe Update to Rubygems best practices Oct 6, 2016
lib Update to Rubygems best practices Oct 6, 2016
.gitignore
Gemfile
Gemfile.lock
README.md Update to Rubygems best practices Oct 6, 2016
Rakefile
fortune_gem.gemspec

README.md

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 an executable. You can run fortune_gem from the command line!

$ 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.
You can’t perform that action at this time.