Class: SignalWire::Relay::EchoEvent
- Inherits:
-
RelayEvent
- Object
- RelayEvent
- SignalWire::Relay::EchoEvent
- Defined in:
- lib/signalwire/relay/relay_event.rb
Overview
calling.call.echo
Instance Attribute Summary collapse
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Attributes inherited from RelayEvent
#call_id, #event_type, #params, #timestamp
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(state: '', **base) ⇒ EchoEvent
constructor
A new instance of EchoEvent.
Constructor Details
#initialize(state: '', **base) ⇒ EchoEvent
Returns a new instance of EchoEvent.
449 450 451 452 |
# File 'lib/signalwire/relay/relay_event.rb', line 449 def initialize(state: '', **base) super(**base) @state = state end |
Instance Attribute Details
#state ⇒ Object (readonly)
Returns the value of attribute state.
437 438 439 |
# File 'lib/signalwire/relay/relay_event.rb', line 437 def state @state end |
Class Method Details
.from_payload(payload) ⇒ Object
439 440 441 442 443 444 445 446 447 |
# File 'lib/signalwire/relay/relay_event.rb', line 439 def self.from_payload(payload) base = RelayEvent.from_payload(payload) p = base.params new( event_type: base.event_type, params: base.params, call_id: base.call_id, timestamp: base., state: p['state'] || '' ) end |