Created
May 2, 2011 15:07
-
-
Save codespore/951742 to your computer and use it in GitHub Desktop.
my_gem.rb file store in lib/my_gem.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'my_gem/core_ext' | |
module MyGem | |
module Whateva | |
extend ActiveSupport::Concern | |
included do | |
puts "Woohoo!" | |
end | |
module ClassMethods | |
def cm | |
"Class Methods" | |
end | |
end | |
module InstanceMethods | |
def im | |
"Instance Methods" | |
end | |
end | |
end | |
end | |
ActiveRecord::Base.send :include, MyGem::Whateva |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment