Sha256: 6a40452638de3d4af7b727e108b715743f4dd9e44beb078b406bcd97132194a2

Contents?: true

Size: 424 Bytes

Versions: 7

Compression:

Stored size: 424 Bytes

Contents

# a stand-in for a Savon Client, which does instance_eval with delegation
# like the Savon Client
class RequestProxy
  attr_accessor :soap
  def initialize
    @soap=Object.new
  end

  def eval_with_delegation(&block)
    @self_before_instance_eval = eval "self", block.binding
    instance_eval &block
  end

  def method_missing(method, *args, &block)
    @self_before_instance_eval.send method, *args, &block
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rews-0.2.6 spec/request_proxy.rb
rews-0.2.5 spec/request_proxy.rb
rews-0.2.4 spec/request_proxy.rb
rews-0.2.3 spec/request_proxy.rb
rews-0.2.2 spec/request_proxy.rb
rews-0.2.1 spec/request_proxy.rb
rews-0.2.0 spec/request_proxy.rb