lib/caramelize/input_wiki/wiki.rb in caramelize-1.0.0 vs lib/caramelize/input_wiki/wiki.rb in caramelize-1.1.0

- old
+ new

@@ -12,13 +12,12 @@ end def revisions_by_title(title) # new array only containing pages by this name sorted by time asc # this does not support renamed pages - return revisions - .select { |revision| revision.title == title } - .sort { |x,y| x.time <=> y.time } + revisions.select { |revision| revision.title == title } + .sort { |x,y| x.time <=> y.time } end # return an empty array in case this action was not overridden def read_authors [] @@ -47,15 +46,14 @@ def filters @options[:filters] end def latest_revisions - titles.map { |title| revisions_by_title(title).last }.compact + @latest_revisions ||= titles.map { |title| revisions_by_title(title).last }.compact end def markup @options[:markup] end - end end end