RRR === A ruby library for Ruby programming with RR that allows method overload. Methods ======= This provides new 'cm' and 'im' class methods to Object class * Object.cm(&block) adds class methods * Object.im(&block) adds instance methods Example ======= require 'rrr' class User < ActiveRecord::Base cm do by(numeric) {|id| User.find(id) } by(string) {|name| User.find_by_name(name) } end end User.by('x') # => called User.find_by_name('x') User.by(1) # => called User.find(1) User.by # RR::Errors::DoubleNotFoundError Copyright (c) 2009 maiha@wota.jp, released under the MIT license
Project
rrr
A ruby library for Ruby programming with RR that allows method overload
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
Development
Dependencies
Runtime
>= 2.1.2.3
>= 0.10.4
Project Readme