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.""…@param methods [HTTP Verb] One or more HTTP verbs that are accepted by this route. Set to `:any` if you want any verb to be accepted."^@param paths [String] One or more strings representing the URL segment(s) for this route.""%@example Defining a basic route."  class MyAPI < Grape::API"!    route(:any, '/hello') do"      {:hello => 'world'}"    end"
  end:@line_rangeo:
Range:endiˆ:
begini}:	exclF:@scope:
class:
@linei‰:@explicitT:@parameters[["methods0["
paths0["&block0:@files[["lib/grape/api.rbi‰:@current_file_has_commentsT

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
grape-0.1.5 .yardoc/objects/Grape/API/route_c.dat
grape-0.1.4 .yardoc/objects/Grape/API/route_c.dat
grape-0.1.3 .yardoc/objects/Grape/API/route_c.dat