Sha256: 5ba04f8d269c8b47aad17606b1f04edfa63307731d9fe15ef25c308891eb8e6d

Contents?: true

Size: 452 Bytes

Versions: 12

Compression:

Stored size: 452 Bytes

Contents

# frozen_string_literal: true

module Pakyow
  module Realtime
    class Channel
      class << self
        def parse(qualified_channel)
          Channel.new(*qualified_channel.split("::", 2))
        end
      end

      attr_reader :name, :qualifier

      def initialize(channel_name, qualifier = nil)
        @name, @qualifier = channel_name, qualifier
      end

      def to_s
        [@name, @qualifier].join("::")
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pakyow-realtime-1.0.6 lib/pakyow/realtime/channel.rb
pakyow-realtime-1.0.5 lib/pakyow/realtime/channel.rb
pakyow-realtime-1.0.4 lib/pakyow/realtime/channel.rb
pakyow-realtime-1.0.3 lib/pakyow/realtime/channel.rb
pakyow-realtime-1.0.2 lib/pakyow/realtime/channel.rb
pakyow-realtime-1.0.1 lib/pakyow/realtime/channel.rb
pakyow-realtime-1.0.0 lib/pakyow/realtime/channel.rb
pakyow-realtime-1.0.0.rc5 lib/pakyow/realtime/channel.rb
pakyow-realtime-1.0.0.rc4 lib/pakyow/realtime/channel.rb
pakyow-realtime-1.0.0.rc3 lib/pakyow/realtime/channel.rb
pakyow-realtime-1.0.0.rc2 lib/pakyow/realtime/channel.rb
pakyow-realtime-1.0.0.rc1 lib/pakyow/realtime/channel.rb