class Trap
  def initialize(value)
    @value = value
  end

  def method_missing(method, *args)
    p method, caller[0]
    @value.send(method, *args)
  end
end

module David
  class Trap
    def initialize(value = nil)
      @value = value
    end

    def method_missing(method, *args)
      p method, caller[0]
      @value.send(method, *args) unless @value.nil?
    end
  end
end

Make wrapped object optional for Trap.
Make wrapped object optional for Trap.
