Sha256: 5cf568086bee7a9f4e2601b2149508a69a5718be0985f72a332403fd38399f77

Contents?: true

Size: 531 Bytes

Versions: 246

Compression:

Stored size: 531 Bytes

Contents

# frozen_string_literal: false

module SplitIoClient
  module SSE
    module EventSource
      class StreamData
        attr_reader :event_type, :channel, :data, :client_id

        def initialize(event_type, client_id, data, channel)
          @event_type = event_type
          @client_id = client_id
          @data = data
          @channel = channel&.gsub(SplitIoClient::Constants::OCCUPANCY_CHANNEL_PREFIX, '')
        end

        def occupancy?
          @channel.include? 'control'
        end
      end
    end
  end
end

Version data entries

246 entries across 246 versions & 1 rubygems

Version Path
splitclient-rb-8.3.0.pre.rc1-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.0.pre.rc1 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.2.0-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.2.0 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.3.pre.rc4-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.3.pre.rc4 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.3.pre.rc3-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.3.pre.rc3 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.3.pre.rc2-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.3.pre.rc2 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.3.pre.rc1-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.3.pre.rc1 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.2-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.2 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.2.pre.rc1-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.2.pre.rc1 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.1-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.1 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.1.pre.rc3-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.1.1.pre.rc3 lib/splitclient-rb/sse/event_source/stream_data.rb