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.4.0-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.4.0 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.4.0.pre.rc1-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.4.0.pre.rc1 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.4.0.rc.1-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.4.0.rc.1 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.2.pre.rc2-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.2.pre.rc2 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.2.pre.rc1-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.2.pre.rc1 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.1-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.1 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.1.pre.rc1-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.1.pre.rc1 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.0-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.0 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.0.pre.rc3-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.0.pre.rc3 lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.0.pre.rc2-java lib/splitclient-rb/sse/event_source/stream_data.rb
splitclient-rb-8.3.0.pre.rc2 lib/splitclient-rb/sse/event_source/stream_data.rb