Created
November 15, 2011 06:36
-
-
Save artemk/1366336 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 A | |
def meth2 | |
meth1 | |
end | |
private | |
def meth1 | |
puts "AAAQWE" | |
end | |
end | |
class B | |
include A | |
end | |
B.new.meth1 #=> NoMethodError: private method ‘meth1’ called for #<B:0x00000100865e88> | |
B.new.meth2 #=> "AAAQWE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment