Module: Ratalada::Frontends::Grape
- Defined in:
- lib/ratalada/grape.rb
Overview
Grape-flavoured DSL: the Server.run block is class-evaluated into an
anonymous Grape::API, so get "/" do ... end, resource, params, etc.
all work. A Grape::API subclass is itself the rack app, so we hand the
class straight to the backend.
Class Method Summary collapse
Class Method Details
.build(block) ⇒ Object
13 14 15 16 17 |
# File 'lib/ratalada/grape.rb', line 13 def self.build(block) app = Class.new(::Grape::API) app.class_eval(&block) app end |