Skip to content

Instantly share code, notes, and snippets.

@knowtheory
Created January 1, 2009 16:02
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 knowtheory/42301 to your computer and use it in GitHub Desktop.
Save knowtheory/42301 to your computer and use it in GitHub Desktop.
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