allomov
4/15/2013 - 9:04 PM

You can make this code work by removing the ```self``` keyword from ```public_method``` invocation.

You can make this code work by removing the self keyword from public_method invocation.

class C
  def public_method
    self.private_method
  end
  
  private
  
  def private_method; end
end

C.new.public_method
# => NoMethodError: private method ‘private_method' called [...]