Class: TwilioBase::Routers::Voice::Base
- Inherits:
-
Object
- Object
- TwilioBase::Routers::Voice::Base
- Defined in:
- app/services/twilio_base/routers/voice/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(protocol:) ⇒ Base
constructor
A new instance of Base.
- #route ⇒ Object
Constructor Details
#initialize(protocol:) ⇒ Base
Returns a new instance of Base.
20 21 22 |
# File 'app/services/twilio_base/routers/voice/base.rb', line 20 def initialize(protocol:) self.protocol = protocol end |
Instance Method Details
#route ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'app/services/twilio_base/routers/voice/base.rb', line 24 def route yield_response = yield if block_given? vr = yield_response || voice_response vr.public_send(routing_method, routing_attributes) do |router| router.public_send( name, endpoint, status_callback_event: status_callback_events, status_callback: status_callback_url ) end.to_s end |