lib/caramelize/page.rb in caramelize-0.1.2 vs lib/caramelize/page.rb in caramelize-0.2.0

- old
+ new

@@ -3,15 +3,15 @@ attr_accessor :title, :body, :id, :markup, :latest, :time, :message, :author, :author_name def initialize page={} @id = page[:id] - @title = page[:title] - @body = page[:body] + @title = page[:title] ? page[:title] : "" + @body = page[:body] ? page[:body] : "" @syntax = page[:markup] - @latest = page[:latest] - @time = page[:time] - @message = page[:message] + @latest = page[:latest] ? page[:latest] : false + @time = page[:time] ? page[:time] : Time.now + @message = page[:message] ? page[:message] : "" @author = page[:author] @author_name = page[:author_name] end def latest? \ No newline at end of file