class Riddl::Implementation

Public Class Methods

new(request) click to toggle source
# File lib/ruby/riddl/implementation.rb, line 3
def initialize(request)
  @request = request

  @h =     request[:h]     # incoming riddl headers
  @p =     request[:p]     # incoming riddl parameters
  @r =     request[:r]     # the matching resource path (fixed)
  @s =     request[:s]     # the matching resource path schema (fixed)
  @match = request[:match] # the matching resource path schema for current resource, important for recursive
  @env =   request[:env]   # environment (all headers)
  @a =     request[:a]     # args to run command
  @m =     request[:m]     # get, put, post, ...

  @headers = []
end

Public Instance Methods

headers() click to toggle source
# File lib/ruby/riddl/implementation.rb, line 20
def headers                       # riddl headers to return (additional headers not defined in description are okay too)
  @headers
end
response() click to toggle source
# File lib/ruby/riddl/implementation.rb, line 17
def response                      # riddl parameters to return
  @response || []
end
status() click to toggle source
# File lib/ruby/riddl/implementation.rb, line 23
def status                        # return status
  @status || 200
end