Created
January 1, 2009 16:02
-
-
Save knowtheory/42301 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
Lucem ted$ irb | |
>> module Mod | |
>> def test | |
>> | |
>> puts "test" | |
>> end | |
>> end | |
=> nil | |
>> Mod.test | |
NoMethodError: private method `test' called for Mod:Module | |
from (irb):6 | |
>> module Mod | |
>> def self.test | |
>> puts "test" | |
>> end | |
>> end | |
=> nil | |
>> Mod.test | |
test | |
=> nil | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment