Class: LiveCable::Connection
- Inherits:
-
Object
- Object
- LiveCable::Connection
- Includes:
- Broadcasting, ChannelManagement, ComponentManagement, ErrorHandling, Messaging, StateManagement
- Defined in:
- lib/live_cable/connection.rb,
lib/live_cable/connection/messaging.rb,
lib/live_cable/connection/broadcasting.rb,
lib/live_cable/connection/error_handling.rb,
lib/live_cable/connection/state_management.rb,
lib/live_cable/connection/channel_management.rb,
lib/live_cable/connection/component_management.rb
Defined Under Namespace
Modules: Broadcasting, ChannelManagement, ComponentManagement, ErrorHandling, Messaging, StateManagement
Constant Summary collapse
- SHARED_CONTAINER =
'_shared'
Instance Method Summary collapse
-
#initialize(request) ⇒ Connection
constructor
A new instance of Connection.
Methods included from ErrorHandling
Methods included from Broadcasting
Methods included from Messaging
Methods included from StateManagement
#changeset_for, #dirty, #get, #reset_changeset, #set
Methods included from ChannelManagement
Methods included from ComponentManagement
#add_component, #get_component, #remove_component
Constructor Details
#initialize(request) ⇒ Connection
Returns a new instance of Connection.
14 15 16 17 18 19 20 |
# File 'lib/live_cable/connection.rb', line 14 def initialize(request) @request = request @session_id = SecureRandom.uuid @containers = Hash.new { |hash, key| hash[key] = Container.new } @components = {} @channels = {} end |