Ruby programming with RR
License
maiha/rrr
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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
About
Ruby programming with RR
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published