Module: TieredCategoryExpressions::Preprocessor
- Defined in:
- lib/tiered_category_expressions/preprocessor.rb
Class Method Summary collapse
-
.call(category) ⇒ String
Converts a category to a string suitable for matching with TCE regexps.
Class Method Details
.call(category) ⇒ String
Converts a category to a string suitable for matching with TCE regexps.
18 19 20 21 22 |
# File 'lib/tiered_category_expressions/preprocessor.rb', line 18 def call(category) return "" if category.empty? category.map { |t| sanitize_name(t) }.join(">") + ">" end |