aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli
diff options
context:
space:
mode:
authorMarkus Reiter2016-10-24 17:07:57 +0200
committerMarkus Reiter2016-11-13 23:00:47 +0100
commit84b2276fd866342cd84c6ada8ffc13c5c209c3cf (patch)
treedc5b52be0021022438af2df26d22be1b4d13aef5 /Library/Homebrew/cask/lib/hbc/cli
parentfc3d586584ea8c0208ec08c4797effa8b3824b78 (diff)
downloadbrew-84b2276fd866342cd84c6ada8ffc13c5c209c3cf.tar.bz2
Use guard clauses.
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/search.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/search.rb b/Library/Homebrew/cask/lib/hbc/cli/search.rb
index 8e8f8fd75..3f73fcd2e 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/search.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/search.rb
@@ -41,14 +41,15 @@ module Hbc
ohai "Exact match"
puts exact_match
end
- unless partial_matches.empty?
- if extract_regexp search_term
- ohai "Regexp matches"
- else
- ohai "Partial matches"
- end
- puts Formatter.columns(partial_matches)
+
+ return if partial_matches.empty?
+
+ if extract_regexp search_term
+ ohai "Regexp matches"
+ else
+ ohai "Partial matches"
end
+ puts Formatter.columns(partial_matches)
end
def self.help