Class: JADOF::Post
Overview
Constant Summary
Constants inherited from Page
JADOF::Page::DEFAULT_DIR, JADOF::Page::DEFAULT_FORMATTERS
Instance Attribute Summary collapse
-
#date ⇒ Time
If a [String] is passed in, it will be parsed as a time.
Attributes inherited from Page
#body, #filename, #name, #parent, #path
Attributes included from PageAPI
Instance Method Summary collapse
-
#to_param ⇒ String
post urls, eg.
Methods inherited from Page
#==, #extensions, #full_name, #initialize, #render, #to_s
Methods included from PageAPI
#[], #all, #cache_for, #count, #first, #from_path, #get, #inherited, #last, #matches_conditions?, #render, #where
Constructor Details
This class inherits a constructor from JADOF::Page
Instance Attribute Details
#date ⇒ Time
If a [String] is passed in, it will be parsed as a time.
12 13 14 |
# File 'lib/jadof/post.rb', line 12 def date @date end |
Instance Method Details
#to_param ⇒ String
post urls, eg. ‘2010/01/31/name-of-post`
20 21 22 |
# File 'lib/jadof/post.rb', line 20 def to_param date ? "#{ date.strftime('%Y/%m/%d') }/#{ full_name }" : super end |