Project

unpatched

0.01
No commit activity in last 3 years
No release in over 3 years
Convenience library without a single monkey-patch.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
 Project Readme

Convenience library, like ActiveSupport or extlib, but without a single monkey-patch. It is also an API experiment.

Usage

Stand alone:

require 'unpatched'
include Unpatched

like("FooBar").but.underscore!
about(1).month.and(4).days.ago!

Is that too much sugar? Try this:

require 'unpatched'
include Unpatched::Unfancy
_('FooBar').underscore!

Still too much?

require 'unpatched'
Unpatched['FooBar'].underscore!

With Sinatra:

require 'sinatra'
require 'unpatched'
helpers Unpatched

get '/' do
  expires exactly(1.5).minutes.from_now!
  "Hey, ho, let's go!"
end

When to use an exclamation mark

Short: You don't have to. But methods without one will always return magically enhanced objects. Since you never want to pass those on (otherwise, what's the point?), you can get vanilla objects by using an exclamation mark.

Rule of thumb: Use it at the end of your method chain.

Installation

gem install unpatched