Created
February 3, 2012 14:47
-
-
Save urfolomeus/1730501 to your computer and use it in GitHub Desktop.
Class level privates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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