How to call an instance method defined in a module that is overwritten by another module in Ruby?
<pre><code>class Person
  include Voice
  include Beep
end

module Voice
  def speak
    puts 'speaking from module'
  end

  def original_speak
    # ???
  end
end

module Beep
  def speak
    puts 'beep beep'
  end
end
</code></pre>

<p>How to call <code>Voice#speak</code>? For example:</p>

<pre><code>Person.new.voice_speak
</code></pre>

<p>I want to add this code to the Voice module, not the Person class or the Beep module.</p>

<p>Use case:<br>
A module that does soft delete:</p>

<pre><code>module Undeletable
  def delete
    # mark document as deleted. This creates a deletion document.
  end

  def restore
    # Delete (for real) the deletion.
  end

  def obliterate
    restore # because we don't want orphaned deletions.

    real_delete # This should call Mongoid#delete
  end
end

def Foo
  include Mongoid::Document
  include Undeletable
end
</code></pre>

<p>So, in general, when we call foo.delete, we want to soft delete. However, in rare cases, we want to do a real delete. The module should support both methods.</p>