Class: Miron::Server

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

Overview

Miron::Server allows HTTP responses to be sent.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, options) ⇒ Response

Returns the newly created Response

Parameters:

  • app (String)

    A String of the mironfile that will be powering the Miron::Server

  • options (Hash)

    A Hash of configuration options



16
17
18
19
20
# File 'lib/miron/server.rb', line 16

def initialize(app, options)
  @app = app
  @options = options
  resolve_handler
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



5
6
7
# File 'lib/miron/server.rb', line 5

def app
  @app
end

#handlerObject

Returns the value of attribute handler.



6
7
8
# File 'lib/miron/server.rb', line 6

def handler
  @handler
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/miron/server.rb', line 5

def options
  @options
end

Instance Method Details

#startObject



22
23
24
# File 'lib/miron/server.rb', line 22

def start
  @handler.run(app, options)
end