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

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

    super(header_token, &block)
  end
end

module Hbc
  class CaskLoader
    prepend CaskLoaderCompatibilityLayer
  end
end