123456789_123456789_123456789_123456789_123456789_

Module: ActionCable::Connection::Identification

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Defined in: actioncable/lib/action_cable/connection/identification.rb

Class Method Summary

::ActiveSupport::Concern - Extended

class_methods

Define class methods from given block.

included

Evaluate given block in context of base class, so that you can write class macros here.

prepended

Evaluate given block in context of base class, so that you can write class macros here.

Instance Method Summary

  • #connection_identifier

    Return a single connection identifier that combines the value of all the registered identifiers into a single gid.

DSL Calls

included

[ GitHub ]


10
11
12
# File 'actioncable/lib/action_cable/connection/identification.rb', line 10

included do
  class_attribute :identifiers, default: Set.new
end

Instance Method Details

#connection_identifier

Return a single connection identifier that combines the value of all the registered identifiers into a single gid.

[ GitHub ]

  
# File 'actioncable/lib/action_cable/connection/identification.rb', line 27

def connection_identifier
  unless defined? @connection_identifier
    @connection_identifier = connection_gid identifiers.map { |id| instance_variable_get("@#{id}") }.compact
  end

  @connection_identifier
end