Module: Ratalada::Frontends::Routes

Defined in:
lib/ratalada.rb

Overview

The default DSL: the Server.run block is a router. It is called with each Request and returns a handler for it — a callable (called with the request), a response body String, or a full [status, headers, body] triplet. No match (nil, or a fall-through case ... in) means 404.

Defined Under Namespace

Classes: App

Class Method Summary collapse

Class Method Details

.build(block) ⇒ Object



64
65
66
# File 'lib/ratalada.rb', line 64

def self.build(block)
  App.new(block)
end