Class: Noticed::DeliveryMethods::ActionCable
Instance Attribute Summary
#config, #event, #notification
Instance Method Summary
collapse
#evaluate_option, #fetch_constant, #perform
Methods included from ApiClient
#post_request
Instance Method Details
#channel ⇒ Object
10
11
12
|
# File 'lib/noticed/delivery_methods/action_cable.rb', line 10
def channel
fetch_constant(:channel) || Noticed::NotificationChannel
end
|
#deliver ⇒ Object
6
7
8
|
# File 'lib/noticed/delivery_methods/action_cable.rb', line 6
def deliver
channel.broadcast_to stream, evaluate_option(:message)
end
|
#stream ⇒ Object
14
15
16
|
# File 'lib/noticed/delivery_methods/action_cable.rb', line 14
def stream
evaluate_option(:stream) || recipient
end
|