Rcal provides Ical parsing and generation in Ruby. Loads of information
is available in the Rdoc; I suggest starting with rcal.rb.