Sha256: e3ec312f0ac6f783d51c30288f5d18b919b5fcc2ad7da2ee8a89017c2a99999b

Contents?: true

Size: 436 Bytes

Versions: 36

Compression:

Stored size: 436 Bytes

Contents

module Hyrax
  module WithEvents
    def stream
      Nest.new(event_class)[to_param]
    end

    def event_class
      self.class.name
    end

    def events(size = -1)
      event_stream.fetch(size)
    end

    def log_event(event_id)
      event_stream.push(event_id)
    end

    private

      def event_store
        RedisEventStore
      end

      def event_stream
        event_store.for(stream[:event])
      end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/models/concerns/hyrax/with_events.rb
hyrax-2.9.5 app/models/concerns/hyrax/with_events.rb
hyrax-2.9.4 app/models/concerns/hyrax/with_events.rb
hyrax-2.9.3 app/models/concerns/hyrax/with_events.rb
hyrax-2.9.2 app/models/concerns/hyrax/with_events.rb
hyrax-2.9.1 app/models/concerns/hyrax/with_events.rb
hyrax-2.9.0 app/models/concerns/hyrax/with_events.rb
hyrax-2.8.0 app/models/concerns/hyrax/with_events.rb
hyrax-2.7.2 app/models/concerns/hyrax/with_events.rb
hyrax-2.7.1 app/models/concerns/hyrax/with_events.rb
hyrax-2.7.0 app/models/concerns/hyrax/with_events.rb
hyrax-2.6.0 app/models/concerns/hyrax/with_events.rb
hyrax-3.0.0.pre.rc1 app/models/concerns/hyrax/with_events.rb
hyrax-3.0.0.pre.beta3 app/models/concerns/hyrax/with_events.rb
hyrax-2.5.1 app/models/concerns/hyrax/with_events.rb
hyrax-2.5.0 app/models/concerns/hyrax/with_events.rb
hyrax-3.0.0.pre.beta2 app/models/concerns/hyrax/with_events.rb
hyrax-2.4.1 app/models/concerns/hyrax/with_events.rb
hyrax-3.0.0.pre.beta1 app/models/concerns/hyrax/with_events.rb
hyrax-2.4.0 app/models/concerns/hyrax/with_events.rb