Sha256: 0d639dd31d019205ccd8ea76151205343ebe8346bd6ce81caf99a29f0a2b67af

Contents?: true

Size: 507 Bytes

Versions: 28

Compression:

Stored size: 507 Bytes

Contents

module IcalImporter
  class Builder
    attr_reader :event, :recurrence_builder
    def initialize(event, recurrence_builder)
      @event = event
      @recurrence_builder = recurrence_builder
    end

    def handle_as_recurrence?
      event.recurrence_id.present?
    end

    def build
      if handle_as_recurrence?
        recurrence_builder << event
        nil # Don't want this messing up our collect in Collector
      else
        SingleEventBuilder.new(event).build
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
ical_importer-0.5.1 lib/ical_importer/builder.rb
ical_importer-0.5.0 lib/ical_importer/builder.rb
ical_importer-0.4.0 lib/ical_importer/builder.rb
ical_importer-0.3.0 lib/ical_importer/builder.rb
ical_importer-0.2.0 lib/ical_importer/builder.rb
ical_importer-0.1.3 lib/ical_importer/builder.rb
ical_importer-0.1.2 lib/ical_importer/builder.rb
ical_importer-0.1.1 lib/ical_importer/builder.rb
ical_importer-0.1.0 lib/ical_importer/builder.rb
ical_importer-0.0.19 lib/ical_importer/builder.rb
ical_importer-0.0.18 lib/ical_importer/builder.rb
ical_importer-0.0.17 lib/ical_importer/builder.rb
ical_importer-0.0.16 lib/ical_importer/builder.rb
ical_importer-0.0.15 lib/ical_importer/builder.rb
ical_importer-0.0.14 lib/ical_importer/builder.rb
ical_importer-0.0.13 lib/ical_importer/builder.rb
ical_importer-0.0.12 lib/ical_importer/builder.rb
ical_importer-0.0.11 lib/ical_importer/builder.rb
ical_importer-0.0.10 lib/ical_importer/builder.rb
ical_importer-0.0.9 lib/ical_importer/builder.rb