Class: RuboCop::Cop::Cask::NoDslVersion

Inherits:
Base
  • Object
show all
Extended by:
AutoCorrector, Forwardable, T::Sig
Includes:
CaskHelp
Defined in:
rubocops/cask/no_dsl_version.rb

Overview

Do not use the deprecated DSL version syntax in your cask header.

Examples:

# bad
cask :v1 => 'foo' do
  ...
end

# good
cask 'foo' do
  ...
end

Constant Summary collapse

MESSAGE =
"Use `%<preferred>s` instead of `%<current>s`"

Instance Method Summary collapse

Methods included from CaskHelp

#on_block

Instance Method Details

#on_cask(cask_block) ⇒ Object



30
31
32
33
34
35
# File 'rubocops/cask/no_dsl_version.rb', line 30

def on_cask(cask_block)
  @cask_header = cask_block.header
  return unless offense?

  offense
end