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



122
123
124
125
126
127
128
129
# File 'lib/middleman-blog/uri_templates.rb', line 122

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