Sha256: 1d448ebdfe0e027bcdb6f514c65d6793b671a8f7a81e12a123b7e89158bf529b

Contents?: true

Size: 565 Bytes

Versions: 9

Compression:

Stored size: 565 Bytes

Contents

<% @routes.each do |route| %>
  <% route_path = route.path.spec.to_s.gsub("(.:format)", "")
     if route.verb.source =~ /\^?(\w*)\$/
       verb = $1.upcase
     else
       verb = route.verb.source
     end
   %>
  <h3 class='endpoint'>
    <span class="verb <%= verb.downcase %>"><%= verb %></span>
    <%
      formatted_route_path = route_path.split('/').map do |fragment|
        is_id = fragment =~ /^\:[\w|_]+/
        "<span #{'class="id-fragment"' if is_id}>#{fragment}</span>"
      end.join('/')
    %>
    <%= formatted_route_path %>
  </h3>
<% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
yard-api-0.1.10 templates/api/method_details/html/method_signature.erb
yard-api-0.1.8 templates/api/method_details/html/method_signature.erb
yard-api-0.1.7 templates/api/method_details/html/method_signature.erb
yard-api-0.1.6 templates/api/method_details/html/method_signature.erb
yard-api-0.1.5 templates/api/method_details/html/method_signature.erb
yard-api-0.1.4 templates/api/method_details/html/method_signature.erb
yard-api-0.1.3 templates/api/method_details/html/method_signature.erb
yard-api-0.1.2 templates/api/method_details/html/method_signature.erb
yard-api-0.1.1 templates/api/method_details/html/method_signature.erb