Class: Adhearsion::Translator::Asterisk::Component::Asterisk::AMIAction
- Defined in:
- lib/adhearsion/translator/asterisk/component/asterisk/ami_action.rb
Instance Attribute Summary collapse
-
#translator ⇒ Object
readonly
Returns the value of attribute translator.
Attributes inherited from Component
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(component_node, translator, ami_client) ⇒ AMIAction
constructor
A new instance of AMIAction.
Methods inherited from Component
#call_ended, #execute_command, #logger_id, #send_complete_event, #send_event, #setup
Constructor Details
#initialize(component_node, translator, ami_client) ⇒ AMIAction
Returns a new instance of AMIAction.
11 12 13 14 |
# File 'lib/adhearsion/translator/asterisk/component/asterisk/ami_action.rb', line 11 def initialize(component_node, translator, ami_client) super component_node, nil @translator, @ami_client = translator, ami_client end |
Instance Attribute Details
#translator ⇒ Object (readonly)
Returns the value of attribute translator.
9 10 11 |
# File 'lib/adhearsion/translator/asterisk/component/asterisk/ami_action.rb', line 9 def translator @translator end |
Instance Method Details
#execute ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/adhearsion/translator/asterisk/component/asterisk/ami_action.rb', line 16 def execute send_ref response = send_action final_event = send_events response send_complete_event success_reason(response, final_event) rescue RubyAMI::Error => e send_complete_event error_reason(e) end |