Module: Hyperloop::AutoConnect

Defined in:
lib/hyper-operation/transport/policy.rb

Class Method Summary collapse

Class Method Details

.channels(session, acting_user) ⇒ Object


353
354
355
356
357
358
# File 'lib/hyper-operation/transport/policy.rb', line 353

def self.channels(session, acting_user)
  channels = ClassConnectionRegulation.connections_for(acting_user, true) +
    InstanceConnectionRegulation.connections_for(acting_user, true)
  channels << "Hyperloop::Session-#{session.split('-').last}" if Hyperloop.connect_session && session
  channels.uniq.each { |channel| Connection.open(channel, session) }
end