Sha256: 65d7d8decc1f596f35dcbdeaf7af9e867b6dc9b6df9174dc72a1fb8279a43a52
Contents?: true
Size: 596 Bytes
Versions: 10
Compression:
Stored size: 596 Bytes
Contents
require 'document_mapper' module Sinatra module HacketySling class Post include DocumentMapper::Document self.directory = File.expand_path('../../../../test/test_posts', __FILE__) def permalink [ self.date_permalink, self.file_name_without_extension.sub(/^\d{4}-\d{2}-\d{2}-/, '') ].join('') + '/' end def date_permalink '/' + ([ sprintf("%04d", self.date.year), sprintf("%02d", self.date.month), sprintf("%02d", self.date.day) ].join '/') + '/' end end end end
Version data entries
10 entries across 10 versions & 1 rubygems