diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cask_loader.rb | 9 | ||||
| -rw-r--r-- | Library/Homebrew/compat/hbc/cask_loader.rb | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cask_loader.rb b/Library/Homebrew/cask/lib/hbc/cask_loader.rb index 63660fcd0..3fe02d7e1 100644 --- a/Library/Homebrew/cask/lib/hbc/cask_loader.rb +++ b/Library/Homebrew/cask/lib/hbc/cask_loader.rb @@ -32,17 +32,12 @@ module Hbc end def cask(header_token, &block) - @klass = Cask - build_cask(header_token, &block) - end - - def build_cask(header_token, &block) raise CaskTokenDoesNotMatchError.new(@token, header_token) unless @token == header_token if @path.nil? - @klass.new(@token, &block) + Cask.new(@token, &block) else - @klass.new(@token, sourcefile_path: @path, &block) + Cask.new(@token, sourcefile_path: @path, &block) end end end diff --git a/Library/Homebrew/compat/hbc/cask_loader.rb b/Library/Homebrew/compat/hbc/cask_loader.rb index e7f3a4aac..a7c84e3ce 100644 --- a/Library/Homebrew/compat/hbc/cask_loader.rb +++ b/Library/Homebrew/compat/hbc/cask_loader.rb @@ -1,7 +1,7 @@ module CaskLoaderCompatibilityLayer private - def build_cask(header_token, &block) + def cask(header_token, &block) if header_token.is_a?(Hash) && header_token.key?(:v1) odeprecated %q("cask :v1 => 'token'"), %q("cask 'token'") header_token = header_token[:v1] |
