Class: Uma::App
- Inherits:
-
Object
- Object
- Uma::App
- Defined in:
- lib/uma/app.rb
Instance Method Summary collapse
- #connection_proc ⇒ Object
-
#initialize(fn) ⇒ App
constructor
A new instance of App.
- #run(proc) ⇒ Object
- #to_proc ⇒ Object
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_proc ⇒ Object
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_proc ⇒ Object
23 |
# File 'lib/uma/app.rb', line 23 def to_proc = @proc |