aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compat/hbc/cask_loader.rb
blob: e7f3a4aac21b1116272f6f5df52f6883a6f29ef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module CaskLoaderCompatibilityLayer
  private

  def build_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]
    end

    super(header_token, &block)
  end
end

module Hbc
  class CaskLoader
    prepend CaskLoaderCompatibilityLayer
  end
end