Skip to content

Instantly share code, notes, and snippets.

@urfolomeus
Created February 3, 2012 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save urfolomeus/1730501 to your computer and use it in GitHub Desktop.
Save urfolomeus/1730501 to your computer and use it in GitHub Desktop.
Class level privates
class Hello
def self.first
puts "Boo!"
end
private
def self.second
puts "Buh!"
end
class << self
def third
puts "Bugger"
end
end
end
Hello.first
Hello.second
Hello.third
-> "Boo!"
-> "Buh!"
-> "Bugger"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment