Closed
Description
env
grape (0.6.1)
goliath (1.0.3)
rack (1.5.2)
posts.rb
class Posts < Grape::API
version 'v1', :using => :path
format :json
params do
requires :id, type: Integer
end
resource 'shopping-carts' do
get "/users/:id" do
end
post "/users" do
end
put "/users/:id" do
end
delete "/users/:id" do
end
end
end
2.0.0p247 :001 > Posts.endpoints.size
=> 4
2.0.0p247 :002 > load '/home/tumayun/workspace/shopping-cart-service/app/apis/posts.rb'
=> true
2.0.0p247 :003 > Posts.endpoints.size
=> 8
2.0.0p247 :004 > load '/home/tumayun/workspace/shopping-cart-service/app/apis/posts.rb'
=> true
2.0.0p247 :005 > Posts.endpoints.size
=> 12
2.0.0p247 :006 > load '/home/tumayun/workspace/shopping-cart-service/app/apis/posts.rb'
=> true
2.0.0p247 :007 > Posts.endpoints.size
=> 16