Class: Punchblock::Translator::Freeswitch::Component::AbstractOutput
- Defined in:
- lib/punchblock/translator/freeswitch/component/abstract_output.rb
Constant Summary collapse
- UnrenderableDocError =
Class.new OptionError
Instance Attribute Summary
Attributes inherited from Component
Instance Method Summary collapse
Methods inherited from Component
#application, #call_ended, #handle_es_event, #initialize, #logger_id, #send_complete_event, #send_event, #setup
Methods included from DeadActorSafety
Constructor Details
This class inherits a constructor from Punchblock::Translator::Freeswitch::Component::Component
Instance Method Details
#execute(*args) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/punchblock/translator/freeswitch/component/abstract_output.rb', line 10 def execute(*args) validate send_ref do_output(*args) rescue UnrenderableDocError => e with_error 'unrenderable document error', e. rescue OptionError => e with_error 'option error', e. end |
#execute_command(command) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/punchblock/translator/freeswitch/component/abstract_output.rb', line 20 def execute_command(command) case command when Punchblock::Component::Stop command.response = true application 'break' send_complete_event Punchblock::Event::Complete::Stop.new else super end end |