Module: Emmett

Defined in:
lib/emmett.rb,
lib/emmett/railtie.rb,
lib/emmett/version.rb,
lib/emmett/document.rb,
lib/emmett/renderer.rb,
lib/emmett/template.rb,
lib/emmett/rake_task.rb,
lib/emmett/configuration.rb,
lib/emmett/document_manager.rb,
lib/emmett/http_request_processor.rb

Defined Under Namespace

Classes: Configuration, Document, DocumentManager, Endpoint, Group, HTTPRequestProcessor, Railtie, RakeTask, Renderer, Section, Template

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.normalize_name(text) ⇒ Object



10
11
12
# File 'lib/emmett/document.rb', line 10

def self.normalize_name(text)
  text.strip.downcase.gsub(/\W+/, '-').gsub(/-+/, '-').gsub(/(^-|-$)/, '')
end