Class: Aardi::Blog

Inherits:
AbstractBlog show all
Defined in:
lib/aardi/blog.rb

Direct Known Subclasses

TagBlog

Instance Attribute Summary

Attributes inherited from AbstractBlog

#key

Instance Method Summary collapse

Methods inherited from AbstractBlog

#metadata, #mtime, #render, #title

Constructor Details

#initializeBlog

Returns a new instance of Blog.



5
6
7
8
9
10
# File 'lib/aardi/blog.rb', line 5

def initialize
  @posts = []
  @blog_path = nil
  @archive_path = Config[:blog_archive_path]
  @tags = Tags.new
end

Instance Method Details

#<<(post) ⇒ Object



12
13
14
15
16
# File 'lib/aardi/blog.rb', line 12

def <<(post)
  @posts << post
  archive << post
  @tags << post
end

#report_recentObject



18
19
20
# File 'lib/aardi/blog.rb', line 18

def report_recent
  recent_posts(:blog_recent_posts).each(&:report_field_summary)
end