Guest User

Untitled

a guest
Feb 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. class Foo
  2. private
  3. def self.hello
  4. puts "hi"
  5. end
  6. end
  7.  
  8. Foo.hello # => "hi"
  9.  
  10. class Bar
  11. class << self
  12. private
  13. def hello
  14. puts "yoh"
  15. end
  16. end
  17. end
  18.  
  19. Bar.hello # => private method `hello' called for Bar:Class (NoMethodError)
Add Comment
Please, Sign In to add comment