Sha256: 16351470fa9d495635aa476bf9d6fbfd5b1d359a699e0d2edd54e7a4c9ec9998

Contents?: true

Size: 665 Bytes

Versions: 6

Compression:

Stored size: 665 Bytes

Contents

module GeoWorks
  class EventsGenerator
    class_attribute :services

    # Array of event generator services.
    # - GeoblacklightEventGenerator: synchronizes with geoblacklight instance.
    # - GeoserverEventGenerator: synchronizes with geoserver instance.
    self.services = [
      GeoblacklightEventGenerator,
      GeoserverEventGenerator
    ]

    delegate :record_created, to: :generators
    delegate :record_deleted, to: :generators
    delegate :record_updated, to: :generators
    delegate :derivatives_created, to: :generators

    def generators
      @generators ||= CompositeGenerator.new(
        services.map(&:new)
      )
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_works-0.2.0 app/services/geo_works/events_generator.rb
geo_works-0.1.4 app/services/geo_works/events_generator.rb
geo_works-0.1.3 app/services/geo_works/events_generator.rb
geo_works-0.1.2 app/services/geo_works/events_generator.rb
geo_works-0.1.1 app/services/geo_works/events_generator.rb
geo_works-0.1.0 app/services/geo_works/events_generator.rb