lib/punchblock/translator/freeswitch/component.rb in punchblock-1.9.4 vs lib/punchblock/translator/freeswitch/component.rb in punchblock-2.0.0.beta1
- old
+ new
@@ -43,14 +43,11 @@
end
def send_complete_event(reason, recording = nil)
return if @complete
@complete = true
- event = Punchblock::Event::Complete.new.tap do |c|
- c.reason = reason
- c << recording if recording
- end
+ event = Punchblock::Event::Complete.new reason: reason, recording: recording
send_event event
terminate
end
def send_event(event)
@@ -80,10 +77,10 @@
def set_node_response(value)
@component_node.response = value
end
def send_ref
- set_node_response Ref.new :id => id
+ set_node_response Ref.new uri: id
end
def with_error(name, text)
set_node_response ProtocolError.new.setup(name, text)
end