Guest User

Untitled

a guest
Feb 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. Lucem ted$ irb
  2. >> module Mod
  3. >> def test
  4. >>
  5. >> puts "test"
  6. >> end
  7. >> end
  8. => nil
  9. >> Mod.test
  10. NoMethodError: private method `test' called for Mod:Module
  11. from (irb):6
  12. >> module Mod
  13. >> def self.test
  14. >> puts "test"
  15. >> end
  16. >> end
  17. => nil
  18. >> Mod.test
  19. test
  20. => nil
  21. >>
Add Comment
Please, Sign In to add comment