Skip to content

Instantly share code, notes, and snippets.

@raldred
Created August 24, 2009 13:41
Show Gist options
  • Save raldred/173889 to your computer and use it in GitHub Desktop.
Save raldred/173889 to your computer and use it in GitHub Desktop.
How to define private class methods in ruby
class Foo
class << self
private
def bar
end
end
end
class Foo
def self.bar
end
private_class_method :bar
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment