A simple interval tree implementation in Ruby