Module: Garage::Docs::ConsoleLinkBuilding
- Included in:
- Renderer, TocRenderer
- Defined in:
- lib/garage/docs/console_link_building.rb
Instance Method Summary collapse
Instance Method Details
#build_console_link(text) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/garage/docs/console_link_building.rb', line 4 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 |