lib/caramelize/input_wiki/wiki.rb in caramelize-1.2.1 vs lib/caramelize/input_wiki/wiki.rb in caramelize-1.3.0

- old
+ new

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