Sha256: 4de206aa750f9f1019539456f4820b35043e1316df4c43483342c12365ce7572

Contents?: true

Size: 503 Bytes

Versions: 44

Compression:

Stored size: 503 Bytes

Contents

class Subject
  def initialize(out=STDOUT)
    calendar_file = File.open(File.join(File.dirname(__FILE__), *%w[ical.ics]), 'r')
    @calendar = RiCal.parse(calendar_file).first
    @cutoff = Date.parse("20100531")
    @out = out
  end
  def run
    cutoff = @cutoff
    @calendar.events.each do |event|
      event.occurrences(:before => cutoff).each do |instance|
        @out.puts "Event #{instance.uid.slice(0..5)}, starting #{instance.dtstart}, ending #{instance.dtend}"
      end 
    end
  end
end

Version data entries

44 entries across 44 versions & 9 rubygems

Version Path
demingfactor-ri_cal-0.10.0 performance/psm_big_enum/subject.rb
demingfactor-ri_cal-0.9.0 performance/psm_big_enum/subject.rb
ebeigarts-ri_cal-0.8.1 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.6.0 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.6.1 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.6.2 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.6.3 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.7.0 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.7.1 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.7.2 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.7.4 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.7.5 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.7.7 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.8.0 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.8.1 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.8.2 performance/psm_big_enum/subject.rb
rubyredrick-ri_cal-0.8.4 performance/psm_big_enum/subject.rb
friflaj_ri_cal-0.9.0 performance/psm_big_enum/subject.rb
awallis-ri_cal-0.8.8 performance/psm_big_enum/subject.rb
justinsoong-ri_cal-0.8.9 performance/psm_big_enum/subject.rb