Class: Moon::Application::Rack

Inherits:
Object
  • Object
show all
Defined in:
lib/moon/application/rack.rb

Overview

Adapter for Rack-up servers. Sinatra is used as helper.

Defined Under Namespace

Classes: Route

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(application) ⇒ Rack

Returns a new instance of Rack.



10
11
12
13
# File 'lib/moon/application/rack.rb', line 10

def initialize(application)
  @application = application
  initialize_transponder
end

Instance Attribute Details

#environmentObject (readonly)

Returns the value of attribute environment.



8
9
10
# File 'lib/moon/application/rack.rb', line 8

def environment
  @environment
end

#routesObject

Returns the value of attribute routes.



6
7
8
# File 'lib/moon/application/rack.rb', line 6

def routes
  @routes
end

#transponderObject (readonly)

Returns the value of attribute transponder.



7
8
9
# File 'lib/moon/application/rack.rb', line 7

def transponder
  @transponder
end

Instance Method Details

#call(*arguments) ⇒ Object



25
26
27
# File 'lib/moon/application/rack.rb', line 25

def call(*arguments)
  @transponder.call *arguments
end

#session=(session) ⇒ Object



15
16
17
18
# File 'lib/moon/application/rack.rb', line 15

def session=(session)
  @session = session
  set_session_secret
end