Skip to content

Instantly share code, notes, and snippets.

@soulcutter
Forked from cstump/gist:5936186
Last active December 19, 2015 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soulcutter/5936232 to your computer and use it in GitHub Desktop.
Save soulcutter/5936232 to your computer and use it in GitHub Desktop.
require 'active_support'
module TestConcern
extend ActiveSupport::Concern
module ClassMethods
def test_class_method
puts "I gots class!"
end
end
def test_instance_method
self.class.test_class_method
end
end
module TestConcern2
extend ActiveSupport::Concern
def test_instance_method
self.class.test_class_method
end
module ClassMethods
def test_class_method
puts "I gots class!"
end
end
end
module TestConcern3
extend ActiveSupport::Concern
module ClassMethods
def test_class_method
puts "I gots class!"
end
end
included do
def test_instance_method
self.class.test_class_method
end
end
end
module TestConcern4
extend ActiveSupport::Concern
included do
def test_instance_method
self.class.test_class_method
end
end
module ClassMethods
def test_class_method
puts "I gots class!"
end
end
end
module TestConcern5
extend ActiveSupport::Concern
included do
test_class_method
end
module ClassMethods
def test_class_method
puts "I gots class!"
end
end
end
module TestConcern6
extend ActiveSupport::Concern
test_class_method
module ClassMethods
def test_class_method
puts "I gots class!"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment