Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module RockNRole
- def self.included(base)
- base.send :extend, ClassMethods
- end
- module ClassMethods
- def has_rockin_roles
- send :include, InstanceMethods
- end
- end
- module InstanceMethods
- def rock_out
- puts "rock!"
- end
- end
- end
- # Hook into ActiveRecord.
- ActiveRecord::Base.send :include, RockNRole
Add Comment
Please, Sign In to add comment