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



100
101
102
103
104
105
106
107
# File 'lib/middleman-blog/uri_templates.rb', line 100

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