Class: Gemstash::Web

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/gemstash/web.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(gemstash_env: nil, http_client_builder: nil) ⇒ Web

Returns a new instance of Web.



8
9
10
11
12
13
# File 'lib/gemstash/web.rb', line 8

def initialize(gemstash_env: nil, http_client_builder: nil)
  @gemstash_env = gemstash_env || Gemstash::Env.new
  @http_client_builder = http_client_builder || Gemstash::HTTPClient
  Gemstash::Env.current = @gemstash_env
  super()
end

Instance Method Details

#http_client_for(server_url) ⇒ Object



20
21
22
# File 'lib/gemstash/web.rb', line 20

def http_client_for(server_url)
  @http_client_builder.for(server_url)
end