Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

13 lines (10 sloc) 0.373 kb
module RepoDepot
module InstanceMethods
def assert_date_sorted events
transitions = events.select {|e| e.date }.each_cons(2).to_a
return unless transitions.map { |e1, e2| e1.date > e2.date }.any?
failure = transitions.detect { |e1, e2| e1.date > e2.date }
raise "events out of order #{failure[0].date}, #{failure[1].date}"
end
end
end
Jump to Line
Something went wrong with that request. Please try again.