Created
September 18, 2013 07:32
-
-
Save acook/6605751 to your computer and use it in GitHub Desktop.
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
module Stuff | |
def an_instance_method | |
puts "Stuff's instance method!" | |
end | |
def self.an_eigenclass_method | |
puts "Stuff's eigenclass method!" | |
end | |
module_function | |
def a_module_function_method | |
puts "Stuff's module function method!" | |
end | |
end | |
Stuff.an_instance_method #=> error method missing | |
Stuff.an_eigenclass_method | |
Stuff.a_module_function_method | |
class Something | |
include Stuff | |
end | |
thing = Something.new | |
thing.an_instance_method | |
thing.an_eigenclass_method #=> error method missing | |
thing.a_module_function_method #=> error private method |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment