Class: Middleman::Blog::BlogTemplateProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/middleman-blog/uri_templates.rb

Overview

A special template processor that validates date fields and has an extra- permissive default regex.

Class Method Summary collapse

Class Method Details

.match(name) ⇒ Object



119
120
121
122
123
124
125
126
# File 'lib/middleman-blog/uri_templates.rb', line 119

def self.match(name)
  case name
  when 'year' then '\d{4}'
  when 'month' then '\d{2}'
  when 'day' then '\d{2}'
  else '.*?'
  end
end