From 6a44ae66e530cdc176827660cb8a9616ca075725 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Wed, 2 May 2012 15:39:18 +0200 Subject: [PATCH] qasim-gui: minor code cleanup. --- bin/qasim-gui.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/qasim-gui.rb b/bin/qasim-gui.rb index f7bf19d..73a7d5a 100755 --- a/bin/qasim-gui.rb +++ b/bin/qasim-gui.rb @@ -97,11 +97,10 @@ module Qasim def action_trigger_map_item map, item @connect_error[map.path] = Set.new @connect_running[map.path] = 0 - if map.connected? then - method = :disconnect - else - method = :connect - end + method = if map.connected? then :disconnect + else :connect + end + begin map.send(method) do |linkname,cmd,cmd_args| process = Qt::Process.new