Sha256: 3bba704eff1d03f08711351427121b7200054bae313dbb71d4b09564860fa7fc

Contents?: true

Size: 354 Bytes

Versions: 22

Compression:

Stored size: 354 Bytes

Contents

module Garage
  module Docs
    module ConsoleLinkBuilding
      def build_console_link(text)
        if text.match(/^(POST|GET|PUT|DELETE)\s+(\/.*)$/)
          query = Rack::Utils.build_query(method: $1, location: $2)
          "<a href='console?#{query}'><small>(console)</small></a>"
        else
          ''
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
the_garage-2.8.2 lib/garage/docs/console_link_building.rb
the_garage-2.8.1 lib/garage/docs/console_link_building.rb
the_garage-2.8.0 lib/garage/docs/console_link_building.rb
the_garage-2.7.0 lib/garage/docs/console_link_building.rb
the_garage-2.6.1 lib/garage/docs/console_link_building.rb
the_garage-2.6.0 lib/garage/docs/console_link_building.rb
the_garage-2.5.0 lib/garage/docs/console_link_building.rb
the_garage-2.4.4 lib/garage/docs/console_link_building.rb
the_garage-2.4.3 lib/garage/docs/console_link_building.rb
the_garage-2.4.2 lib/garage/docs/console_link_building.rb
the_garage-2.4.1 lib/garage/docs/console_link_building.rb
the_garage-2.4.0 lib/garage/docs/console_link_building.rb
the_garage-2.3.3 lib/garage/docs/console_link_building.rb
the_garage-2.3.2 lib/garage/docs/console_link_building.rb
the_garage-2.3.1 lib/garage/docs/console_link_building.rb
the_garage-2.3.0 lib/garage/docs/console_link_building.rb
the_garage-2.2.0 lib/garage/docs/console_link_building.rb
the_garage-2.1.0 lib/garage/docs/console_link_building.rb
the_garage-2.0.3 lib/garage/docs/console_link_building.rb
the_garage-2.0.2 lib/garage/docs/console_link_building.rb