Sha256: 8fd3ff4929545d09eadfb860d90cd73c35538ab875fc3bf69f3f42dd47272179

Contents?: true

Size: 593 Bytes

Versions: 12

Compression:

Stored size: 593 Bytes

Contents

class Rad::Http::HttpAdapter
  inject conveyors: :conveyors

  def call env, workspace = {}, &block
    # result, opt = nil, opt.to_openobject
    workspace = conveyors.web.call(
      {env: env, response: Rad::Http::Response.new}.merge(workspace),
      &block
    )
  
    response = workspace.response.must_be.defined
    result = response.finish
          
    result
  end
  # synchronize_method :call

  # def mock_call env = {}, workspace = {}, &block
  #   env['PATH_INFO'] ||= '/'
  #   env['rack.input'] ||= StringIO.new        
  #   
  #   call env, workspace, &block
  # end  
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rad_core-0.2.6 lib/rad/http/_http_adapter.rb
rad_core-0.2.5 lib/rad/http/_http_adapter.rb
rad_core-0.2.4 lib/rad/http/_http_adapter.rb
rad_core-0.2.3 lib/rad/http/_http_adapter.rb
rad_core-0.2.2 lib/rad/http/_http_adapter.rb
rad_core-0.2.1 lib/rad/http/_http_adapter.rb
rad_core-0.2.0 lib/rad/http/_http_adapter.rb
rad_core-0.0.30 lib/rad/http/_http_adapter.rb
rad_core-0.0.29 lib/rad/http/_http_adapter.rb
rad_core-0.0.28 lib/rad/http/_http_adapter.rb
rad_core-0.0.27 lib/rad/http/_http_adapter.rb
rad_core-0.0.26 lib/rad/http/_http_adapter.rb