lib/post.rb in runeblog-0.0.69 vs lib/post.rb in runeblog-0.0.70
- old
+ new
@@ -9,11 +9,13 @@
files = Find.find(root).to_a
result = files.grep(/#{tag(num)}-/)
result
end
- def initialize(title, view_name)
+ def initialize(title, view_name,
+ teaser = "Teaser goes here.",
+ remainder = "Remainder of post goes here.")
raise "RuneBlog.blog is not set!" if RuneBlog.blog.nil?
@blog = RuneBlog.blog
@title = title
@view = @blog.str2view(view_name)
@num, @slug = make_slug
@@ -24,12 +26,12 @@
.title #{title}
.pubdate #{date}
.views #@view
.teaser
- Teaser goes here.
+ #{teaser}
.end
- Remainder of post goes here.
+ #{remainder}
EOS
@draft = "#{@blog.root}/src/#@slug.lt3"
File.write(@draft, template)
end