Module: ApiGuides::ViewHelper

Included in:
ApiGuides::Views::Document, ApiGuides::Views::Reference, ApiGuides::Views::Section
Defined in:
lib/api_guides/view_helper.rb

Instance Method Summary collapse

Instance Method Details

#anchorize(text) ⇒ Object

AKA permalink



6
7
8
# File 'lib/api_guides/view_helper.rb', line 6

def anchorize(text)
  text.gsub(/[^\w-]/, ' ').gsub(/\s+/, '-').downcase
end