class Signalwire::Relay::Calling::SendDigits
Public Class Methods
new(call:, digits:)
click to toggle source
Calls superclass method
# File lib/signalwire/relay/calling/component/send_digits.rb, line 3 def initialize(call:, digits:) super(call: call) @digits = digits end
Public Instance Methods
broadcast_event(event)
click to toggle source
# File lib/signalwire/relay/calling/component/send_digits.rb, line 36 def broadcast_event(event) @call.broadcast "send_digits_#{@state}".to_sym, event @call.broadcast :send_digits_change, event end
event_type()
click to toggle source
# File lib/signalwire/relay/calling/component/send_digits.rb, line 12 def event_type Relay::CallNotification::SEND_DIGITS end
inner_params()
click to toggle source
# File lib/signalwire/relay/calling/component/send_digits.rb, line 16 def inner_params { node_id: @call.node_id, call_id: @call.id, control_id: control_id, digits: @digits } end
method()
click to toggle source
# File lib/signalwire/relay/calling/component/send_digits.rb, line 8 def method Relay::ComponentMethod::SEND_DIGITS end
notification_handler(event)
click to toggle source
# File lib/signalwire/relay/calling/component/send_digits.rb, line 25 def notification_handler(event) @state = event.call_params[:state] @completed = @state == Relay::CallSendDigitsState::FINISHED @successful = @completed @event = event broadcast_event(event) check_for_waiting_events end
stop()
click to toggle source
# File lib/signalwire/relay/calling/component/send_digits.rb, line 41 def stop logger.warn "SendDigits does not implement a stop action" end