Class: Jason::Channel

Inherits:
ActionCable::Channel::Base
  • Object
show all
Defined in:
lib/jason/channel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#subscriptionsObject

Returns the value of attribute subscriptions.



2
3
4
# File 'lib/jason/channel.rb', line 2

def subscriptions
  @subscriptions
end

Instance Method Details

#receive(message) ⇒ Object



8
9
10
# File 'lib/jason/channel.rb', line 8

def receive(message)
  handle_message(message)
end

#subscribeObject



4
5
6
# File 'lib/jason/channel.rb', line 4

def subscribe
  stream_from 'jason'
end