Sha256: 9a852d00cf0a0507d85e25c508cb800d70f9be5d34e06d623fd03674e4bcb154
Contents?: true
Size: 1.88 KB
Versions: 3
Compression:
Stored size: 1.88 KB
Contents
o:$YARD::CodeObjects::MethodObject: @tags[ :@visibility:public:@signature"&def route(methods, paths, &block): @name: route:@namespaceu:YARD::StubProxyGrape::API:@source"¬def route(methods, paths, &block) methods = Array(methods) paths = ['/'] if paths == [] paths = Array(paths) endpoint = build_endpoint(&block) methods.each do |method| paths.each do |path| path = Rack::Mount::Strexp.compile(compile_path(path)) route_set.add_route(endpoint, :path_info => path, :request_method => (method.to_s.upcase unless method == :any) ) end end end: @dynamicT:@docstring_extra0:@source_type: ruby:@docstringIC:YARD::Docstring">Defines a route that will be recognized by the Grape API.:@objectu; Grape::API.route;[o:YARD::Tags::Tag ;u; Grape::API.route:@tag_name" param; "methods:@types["HTTP Verb: @text"oOne or more HTTP verbs that are accepted by this route. Set to `:any` if you want any verb to be accepted.o; ;u; Grape::API.route;" param; " paths;["String;"HOne or more strings representing the URL segment(s) for this route.o; ;u; Grape::API.route;"example; "Defining a basic route.;0;"Zclass MyAPI < Grape::API route(:any, '/hello') do {:hello => 'world'} end end:@ref_tags[ : @summary0: @all[",Defines a route that will be recognized"by the Grape API."