Class: MinimalTags::SimpleFormatter
- Inherits:
-
Object
- Object
- MinimalTags::SimpleFormatter
- Defined in:
- lib/minimal_tags/simple_formatter.rb
Overview
A very simple tag formatter. You should create your own rather than using this. The Stringex gem works well - github.com/rsl/stringex
Instance Method Summary collapse
-
#normalize(tags) ⇒ Array
Returns an array of normalized tags.
Instance Method Details
#normalize(tags) ⇒ Array
Returns an array of normalized tags
12 13 14 |
# File 'lib/minimal_tags/simple_formatter.rb', line 12 def normalize() .map { |tag| tag.downcase.gsub(/\s/, '-') }.uniq end |