module WebStub::API

Public Instance Methods

disable_network_access!() click to toggle source
# File lib/webstub/api.rb, line 5
def disable_network_access!
  protocol.disable_network_access!
end
enable_network_access!() click to toggle source
# File lib/webstub/api.rb, line 9
def enable_network_access!
  protocol.enable_network_access!
end
reset_stubs() click to toggle source
# File lib/webstub/api.rb, line 17
def reset_stubs
  protocol.reset_stubs
end
stub_request(method, path) click to toggle source
# File lib/webstub/api.rb, line 13
def stub_request(method, path)
  protocol.add_stub(method, path)
end

Private Instance Methods

protocol() click to toggle source
# File lib/webstub/api.rb, line 23
def protocol
  Dispatch.once { NSURLProtocol.registerClass(WebStub::Protocol) }

  Protocol
end