Skip to content

Commit

Permalink
Rubocop style corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Apr 17, 2024
1 parent 586abc1 commit 75cd78b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Metrics/ClassLength:
Metrics/CyclomaticComplexity:
Max: 14

Metrics/BlockLength:
Max: 35

# Offense count: 1
# Configuration parameters: CountComments.
Metrics/MethodLength:
Expand Down
15 changes: 7 additions & 8 deletions src/lib/ydocker/changes_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,13 @@ def close_dialog
end

def controller_loop
loop do
input = Yast::UI.UserInput
case input
when :ok, :cancel
return :ok
else
raise "Unknown action #{input}"
end
# no need to loop, one shot is enough
input = Yast::UI.UserInput
case input
when :ok, :cancel
:ok
else
raise "Unknown action #{input}"
end
end

Expand Down
20 changes: 9 additions & 11 deletions src/lib/ydocker/inject_shell_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,15 @@ def close_dialog
end

def controller_loop
loop do
input = Yast::UI.UserInput
case input
when :ok
attach
return
when :cancel
return
else
raise "Unknown action #{input}"
end
# no need to loop, one shot is enough
input = Yast::UI.UserInput
case input
when :ok
attach
when :cancel
nil
else
raise "Unknown action #{input}"
end
end

Expand Down

0 comments on commit 75cd78b

Please sign in to comment.