Class: EY::Tea::Server::Mock::ThinMuxer

Inherits:
Object
  • Object
show all
Defined in:
lib/htttee/server/mock.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ ThinMuxer

Returns a new instance of ThinMuxer.



35
36
37
# File 'lib/htttee/server/mock.rb', line 35

def initialize(app)
  @app = Rack::Mux.new(async_safe(app), thin_options)
end

Instance Method Details

#async_safe(app) ⇒ Object



43
44
45
# File 'lib/htttee/server/mock.rb', line 43

def async_safe(app)
  AsyncFixer.new(app)
end

#call(env) ⇒ Object



39
40
41
# File 'lib/htttee/server/mock.rb', line 39

def call(env)
  @app.call(env)
end

#thin_optionsObject



47
48
49
# File 'lib/htttee/server/mock.rb', line 47

def thin_options
  { :server => Thin, :environment => 'none' }
end