mirror of
https://github.com/wezm/wezm.net.git
synced 2024-12-24 13:09:53 +00:00
24 lines
No EOL
538 B
Ruby
24 lines
No EOL
538 B
Ruby
module WezM
|
|
module Helpers
|
|
module Articles
|
|
|
|
def personal_articles
|
|
sorted_articles.select { |a| a.identifier =~ %r{^/personal/} }
|
|
end
|
|
|
|
def technical_articles
|
|
sorted_articles.select { |a| a.identifier =~ %r{^/technical/} }
|
|
end
|
|
|
|
def article_to_json(article)
|
|
{
|
|
:title => article[:title],
|
|
:path => article.identifier,
|
|
:date => Time.parse(article[:created_at]).rfc2822,
|
|
:summary => article[:summary]
|
|
}
|
|
end
|
|
|
|
end
|
|
end
|
|
end |