Module: Apigen::Rest
- Defined in:
- lib/apigen/rest/api.rb,
lib/apigen/rest/input.rb,
lib/apigen/rest/output.rb,
lib/apigen/rest/endpoint.rb
Overview
Rest contains what you need to declare a REST-ish API.
Defined Under Namespace
Classes: Api, Endpoint, Input, Output
Class Method Summary collapse
-
.api(&block) ⇒ Object
Declares an API.
Class Method Details
.api(&block) ⇒ Object
Declares an API.
13 14 15 16 17 18 19 |
# File 'lib/apigen/rest/api.rb', line 13 def self.api(&block) api = Api.new raise 'You must a block when calling `api`.' unless block_given? api.instance_eval(&block) api.validate api end |