Module: Artifice
- Defined in:
- lib/artifice-passthru/core.rb,
lib/artifice-passthru/version.rb
Defined Under Namespace
Modules: Passthru
Class Method Summary collapse
-
.passthru! ⇒ Object
Artifice.passthru! returns a Rack response created by making a real Net::HTTP request (using the Artifice::Passthru.last_request_info) and then turning the resulting Net::HTTPResponse object into a Rack response (which Artifice expects).
-
.use_real_net_http(class_or_module) ⇒ Object
Given a constant (class or module), this gives it access to the real Net::HTTP so every request made from within this class/module will use the real Net::HTTP.
Class Method Details
.passthru! ⇒ Object
Artifice.passthru! returns a Rack response created by making a real Net::HTTP request (using the Artifice::Passthru.last_request_info) and then turning the resulting Net::HTTPResponse object into a Rack response (which Artifice expects).
8 9 10 |
# File 'lib/artifice-passthru/core.rb', line 8 def self.passthru! Artifice::Passthru.make_real_request_and_return_response! end |
.use_real_net_http(class_or_module) ⇒ Object
Given a constant (class or module), this gives it access to the real Net::HTTP so every request made from within this class/module will use the real Net::HTTP
14 15 16 |
# File 'lib/artifice-passthru/core.rb', line 14 def self.use_real_net_http class_or_module Artifice::Passthru.setup_to_use_real_net_http class_or_module end |