Skip to content

Instantly share code, notes, and snippets.

@rentalcustard
rentalcustard / privacy_example_failing.rb
Created October 30, 2012 08:43
Ruby private methods
class PrivacyExample
def some_public_method
self.some_private_method
end
def some_private_method
"o hai"
end
private :some_private_method
end
class DashboardController < ResourceController
def get
# show dashboard
end
end
class Foo
def some_method
puts "In some_method"
def some_other_method
puts "In some other method"
"Foo"
end
"Bar"
end
end