Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo
- private
- def self.hello
- puts "hi"
- end
- end
- Foo.hello # => "hi"
- class Bar
- class << self
- private
- def hello
- puts "yoh"
- end
- end
- end
- Bar.hello # => private method `hello' called for Bar:Class (NoMethodError)
Add Comment
Please, Sign In to add comment