Sha256: 1aaf04123abd5aa4b370dbf42592cc12498fca06848174a787d254d56e3d4c3b

Contents?: true

Size: 1.74 KB

Versions: 1

Compression:

Stored size: 1.74 KB

Contents

%html
  %head
    %style{:type => 'text/css'}=css
  %body
    %ul.breadcrumb.well{:style=>'margin-bottom:0;'}
      %li
        %a{ :href => url('/docs') } Documentation
        %span.divider='/'
      %li.active=collection.collection_name.to_s.split('_').map {|p| p.capitalize}.join(' ')
    .container
      %h1.pull-right=collection.collection_name.to_s.split('_').map {|p| p.capitalize}.join(' ')
      %blockquote.clearfix
        %p{ :style => 'width : 400px;font-size:small;padding-top:1em;'}
          =collection.description || 'Collection does not have description set'
      - if !collection.features.empty?
        %h3 Features
        %table.table.table-bordered
          %thead
            %tr
              %th Name
              %th Constraints
              %th Description
          %tbody
            - collection.features.each do |f|
              %tr
                %td
                  %em=f.name
                %td
                  - f.constraints.each do |c, v|
                    ="#{c}=#{v}<br/>"
                %td
                  %small=f.description

      %h3 Operations
      %table.table.table-bordered
        %thead
          %tr
            %th Name
            %th HTTP method
            %th URL
            %th Description
        %tbody
          - collection.operations.each do |o|
            %tr
              %td
                %a{:href => url(o.docs_url) }=o.operation_name
              %td=o.http_method.to_s.upcase
              %td
                %a{ :href=> url(o.full_path) }=o.full_path
              %td
                %small=o.description
    %footer.footer
      .container
        %p
          Documentation generated by
          %a{ :href => 'http://github.com/mifo/sinatra-rabbit'} Rabbit
          extension.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sinatra-rabbit-1.1.1 lib/sinatra/docs/collection.haml