VCR::HttpStubbingAdapters::MultiObjectProxy

Attributes

proxied_objects[R]

Public Class Methods

for(*objects) click to toggle source
# File lib/vcr/http_stubbing_adapters/multi_object_proxy.rb, line 5
def self.for(*objects)
  return objects.first if objects.size == 1
  new(*objects)
end
new(*objects) click to toggle source
# File lib/vcr/http_stubbing_adapters/multi_object_proxy.rb, line 12
def initialize(*objects)
  ::Kernel.raise ::ArgumentError.new("You must pass at least one object to proxy to") if objects.empty?
  ::Kernel.raise ::ArgumentError.new("Cannot proxy to nil") if objects.any? { |o| o.nil? }

  @proxied_objects = objects
end

Public Instance Methods

respond_to?(message) click to toggle source
# File lib/vcr/http_stubbing_adapters/multi_object_proxy.rb, line 19
def respond_to?(message)
  proxied_objects.any? { |o| o.respond_to?(message) }
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.