From ceec5a82c15cf636c8953da15ae73fbc882c5424 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 23 Oct 2016 14:26:17 +0200 Subject: Use guard clauses. --- Library/Homebrew/cask/lib/hbc/cask.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cask/lib/hbc/cask.rb b/Library/Homebrew/cask/lib/hbc/cask.rb index 6f005c036..cb0fdb665 100644 --- a/Library/Homebrew/cask/lib/hbc/cask.rb +++ b/Library/Homebrew/cask/lib/hbc/cask.rb @@ -11,10 +11,9 @@ module Hbc @token = token @sourcefile_path = sourcefile_path @dsl = dsl || DSL.new(@token) - if block_given? - @dsl.instance_eval(&block) - @dsl.language_eval - end + return unless block_given? + @dsl.instance_eval(&block) + @dsl.language_eval end DSL::DSL_METHODS.each do |method_name| -- cgit v1.2.3