Sha256: d28d12469a7d2443803f5a0c14849dc6172d1cc0e0fa94ba36f4d8f19b22bcbb
Contents?: true
Size: 441 Bytes
Versions: 2
Compression:
Stored size: 441 Bytes
Contents
module Acme class PostPut < Grape::API cattr_accessor :rang format :json desc 'Returns pong.' get :ring do { rang: PostPut.rang } end post :ring do result = (PostPut.rang += 1) { rang: result } end params do requires :count, type: Integer end put :ring do result = (PostPut.rang += params[:count].to_i) { rang: result } end end end Acme::PostPut.rang = 0
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vitals-0.4.0 | integration/multiverse/grape-on-rack/api/post_put.rb |
vitals-0.3.0 | integration/multiverse/grape-on-rack/api/post_put.rb |