Class: Riddl::Implementation
- Inherits:
-
Object
- Object
- Riddl::Implementation
- Defined in:
- lib/ruby/riddl/implementation.rb
Direct Known Subclasses
Utils::Description::Call, Utils::Description::RDR, Utils::DocOverlay, Utils::Downloadify, Utils::ERBServe, Utils::FileServe, Utils::Notifications::Producer::CreateSubscription, Utils::Notifications::Producer::DeleteSubscription, Utils::Notifications::Producer::Overview, Utils::Notifications::Producer::Subscription, Utils::Notifications::Producer::Subscriptions, Utils::Notifications::Producer::Topics, Utils::Notifications::Producer::UpdateSubscription, Utils::OAuth2::UnivieApp::RefreshToken, Utils::OAuth2::UnivieApp::RevokeFlow, Utils::OAuth2::UnivieApp::VerifyIdentity, Utils::OAuth2::UnivieBearer::CheckAuth, Utils::Properties::AddContent, Utils::Properties::AddProperties, Utils::Properties::AddProperty, Utils::Properties::All, Utils::Properties::DelContent, Utils::Properties::GetContent, Utils::Properties::Properties, Utils::Properties::PtcContent, Utils::Properties::Query, Utils::Properties::RngSchema, Utils::Properties::Schema, Utils::Properties::UpdContent, Utils::Turtle::GetQuery, Utils::Turtle::Query, Utils::Turtle::Show, Utils::XMLServe, Utils::XSLOverlay
Instance Method Summary collapse
-
#headers ⇒ Object
riddl headers to return (additional headers not defined in description are okay too).
-
#initialize(request) ⇒ Implementation
constructor
A new instance of Implementation.
-
#response ⇒ Object
riddl parameters to return.
-
#status ⇒ Object
return status.
Constructor Details
#initialize(request) ⇒ Implementation
Returns a new instance of Implementation.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# 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 |
Instance Method Details
#headers ⇒ Object
riddl headers to return (additional headers not defined in description are okay too)
20 21 22 |
# 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 ⇒ Object
riddl parameters to return
17 18 19 |
# File 'lib/ruby/riddl/implementation.rb', line 17 def response # riddl parameters to return @response || [] end |
#status ⇒ Object
return status
23 24 25 |
# File 'lib/ruby/riddl/implementation.rb', line 23 def status # return status @status || 200 end |