Class: LiveCable::Connection

Inherits:
Object
  • Object
show all
Includes:
Broadcasting, 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/component_management.rb

Defined Under Namespace

Modules: Broadcasting, ComponentManagement, ErrorHandling, Messaging, StateManagement

Constant Summary collapse

SHARED_CONTAINER =
'_shared'

Instance Method Summary collapse

Methods included from ErrorHandling

#handle_error

Methods included from Broadcasting

#broadcast_changeset

Methods included from Messaging

#action, #reactive, #receive

Methods included from StateManagement

#changeset_for, #dirty, #get, #reset_changeset, #set

Methods included from ComponentManagement

#add_component, #get_component, #remove_component

Constructor Details

#initialize(request) ⇒ Connection

Returns a new instance of Connection.



13
14
15
16
17
# File 'lib/live_cable/connection.rb', line 13

def initialize(request)
  @request = request
  @containers = Hash.new { |hash, key| hash[key] = Container.new }
  @components = {}
end