class Foo

  private

  def my_method
    'it work !'
  end
end
Foo.new.my_method
# => NoMethodError: private method `my_method' called for #<Foo:0x00000003ddb8e8>

Foo.send :public, :my_method
Foo.new.my_method
# => "it work !" 

class Bar < Foo
  public :my_method
end
Foo.new.my_method
# => NoMethodError: private method `my_method' called for #<Foo:0x00000003ddb8e8>

Bar.new.my_method
# => "it work !" 

source