Sha256: e8ae39240de911201f75af7d5dec259e36eb61e64916bb150fb7d37104af19da

Contents?: true

Size: 590 Bytes

Versions: 25

Compression:

Stored size: 590 Bytes

Contents

# #
# AUTO GENERATED LIVE EVENT
# This was auto generated by the CanvasSync Gem.
# You can customize it as needed, but make sure you test
# any changes you make to the auto generated methods.
#


module LiveEvents
  class BaseEvent < CanvasSync::Job
    attr_accessor :payload

    def perform(event_payload)
      @payload = HashWithIndifferentAccess.new(event_payload["body"])
    end

    # Live events will use a canvas global ID (cross shard) for any ID's provided. This method will return the local ID.
    def local_canvas_id(id)
      id.to_i % 10_000_000_000_000
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
canvas_sync-0.9.4 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.9.3 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.9.2 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.9.1 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.9.0 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.8.4 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.8.3 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.8.2 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.8.1 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.8.0 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.7.3 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.7.2 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.7.1 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.7.0 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.6.4 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.6.3 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.6.2 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.6.1 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.6.0 spec/dummy/app/services/live_events/base_event.rb
canvas_sync-0.5.4 spec/dummy/app/services/live_events/base_event.rb