Class: HttpStub::Server::Application::Application

Inherits:
Sinatra::Base
  • Object
show all
Includes:
RequestSupport, Routes::Memory, Routes::Resource, Routes::Scenario, Routes::Session, Routes::Status, Routes::Stub
Defined in:
lib/http_stub/server/application/application.rb

Class Attribute Summary collapse

Attributes included from RequestSupport

#http_stub_request

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Routes::Stub

included

Methods included from Routes::Session

included

Methods included from Routes::Scenario

included

Methods included from Routes::Memory

included

Methods included from Routes::Status

included

Methods included from Routes::Resource

included

Methods included from RequestSupport

#establish_http_stub_request, included

Constructor Details

#initializeApplication

Returns a new instance of Application.


28
29
30
31
# File 'lib/http_stub/server/application/application.rb', line 28

def initialize
  @server_memory = HttpStub::Server::Memory::Memory.new(self.class.configurator_state)
  super()
end

Class Attribute Details

.configurator_stateObject (readonly)

Returns the value of attribute configurator_state


19
20
21
# File 'lib/http_stub/server/application/application.rb', line 19

def configurator_state
  @configurator_state
end

Class Method Details

.configure(configurator) ⇒ Object


21
22
23
24
# File 'lib/http_stub/server/application/application.rb', line 21

def configure(configurator)
  @configurator_state = configurator.state
  @configurator_state.application_settings.each { |name, value| set(name, value) }
end