Module: Stimul8::CableConnection

Extended by:
ActiveSupport::Concern
Defined in:
app/channels/stimul8/cable_connection.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.load_contextObject (readonly)

Returns the value of attribute load_context.



21
22
23
# File 'app/channels/stimul8/cable_connection.rb', line 21

def load_context
  @load_context
end

Class Method Details

.clear_context_loaderObject



18
19
20
# File 'app/channels/stimul8/cable_connection.rb', line 18

def clear_context_loader
  @load_context = nil
end

.load_context_from(&block) ⇒ Object



14
15
16
# File 'app/channels/stimul8/cable_connection.rb', line 14

def load_context_from &block
  @load_context = block
end

Instance Method Details

#connectObject



9
10
11
# File 'app/channels/stimul8/cable_connection.rb', line 9

def connect
  self.context = load_context
end