Skip to content

Instantly share code, notes, and snippets.

@hausdorff
Created April 2, 2016 08:30
Show Gist options
  • Save hausdorff/330ab2bdbec149fa63bf9b0719d2c6f6 to your computer and use it in GitHub Desktop.
Save hausdorff/330ab2bdbec149fa63bf9b0719d2c6f6 to your computer and use it in GitHub Desktop.
An alternative to (some of) the Ruby standard library
Have you ever thought “gee, Ruby's standard library could use a bit of polish?”
Have you ever followed this thought with “I sure love Python's from x import y. I wonder if we can get something like that in Ruby?”
Do you wish Ruby's socket API was nicer?
Do you wish there was a better way to handle default values than throwing nils everywhere?
Then try Heresy today!
Using Heresy
Each component of Heresy is a standalone gem, and can be used as such. However, for simplicity, the heresy gem lists all of them as dependencies.
To take advantage of the latest heretical technology, simply add gem 'heresy' to your projects Gemfile, then require the relevant components as needed.
Components
heresy-string: adds useful methods to Ruby's String class.
net-socket: a better socket API.
from: require parts of Ruby libraries.
default: distinguish between default values and values that can be nil.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment