class SemiStatic::News

Attributes

published_at[RW]

Public Class Methods

all() click to toggle source
Calls superclass method SemiStatic::Page::all
# File lib/semi_static/news.rb, line 7
def self.all
  super.sort_by(&:published_at).reverse
end

Public Instance Methods

id() click to toggle source

used for atom feed

# File lib/semi_static/news.rb, line 12
def id
  Digest::MD5.hexdigest to_param
end
to_param() click to toggle source
# File lib/semi_static/news.rb, line 16
def to_param
  "#{year}/#{month}/#{day}/#{super}"
end