Project

refine

0.0
No commit activity in last 3 years
No release in over 3 years
Start using refine, today. Be ready for Ruby 2.0!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Allows you to use refine in older Ruby versions. It will simply fall back to prepend if available, to include otherwise (read: you will still pollute global scope).

Installation

gem install refine

Example

require 'refine' if RUBY_VERSION < '2.0'

module PassiveSupport
  refine String do
    def underscore
      # ...
    end
    
    def camel_case
      # ...
    end
  end
  
  refine Module do
    def parent
      # ...
    end
  end
end

class MyFancyApp
  using PassiveSupport
end