Skip to content

Instantly share code, notes, and snippets.

@practicingruby
Created December 31, 2014 16:10
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 practicingruby/8d48b18512a1901798f1 to your computer and use it in GitHub Desktop.
Save practicingruby/8d48b18512a1901798f1 to your computer and use it in GitHub Desktop.
class Foo
class << self
def bar
baz
end
private
def baz
puts "Hello there!"
end
end
end
Foo.bar # prints "Hello there!"
Foo.baz # raises error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment