Class: Uma::App

Inherits:
Object
  • Object
show all
Defined in:
lib/uma/app.rb

Instance Method Summary collapse

Constructor Details

#initialize(fn) ⇒ App

Returns a new instance of App.



8
9
10
11
# File 'lib/uma/app.rb', line 8

def initialize(fn)
  @fn = fn
  eval_app_code
end

Instance Method Details

#connection_procObject



17
18
19
20
21
# File 'lib/uma/app.rb', line 17

def connection_proc
  ->(machine, fd) {
    HTTP.http_connection(machine, { app: @proc }, fd)
  }
end

#run(proc) ⇒ Object



13
14
15
# File 'lib/uma/app.rb', line 13

def run(proc)
  @proc = proc
end

#to_procObject



23
# File 'lib/uma/app.rb', line 23

def to_proc = @proc