method
sort_if_need
sort_if_need()
private
Hide source
# File lib/rss/maker/base.rb, line 690 def sort_if_need if @do_sort.respond_to?(:call) @items.sort do |x, y| @do_sort.call(x, y) end elsif @do_sort @items.sort do |x, y| y <=> x end else @items end end