Module: RuboCop::Cop::Cask::OnHomepageStanza

Extended by:
Forwardable
Includes:
CaskHelp
Included in:
HomepageUrlTrailingSlash
Defined in:
brew/Library/Homebrew/rubocops/cask/mixin/on_homepage_stanza.rb

Overview

Common functionality for checking homepage stanzas.

Instance Method Summary collapse

Methods included from CaskHelp

#on_block

Instance Method Details

#on_cask(cask_block) ⇒ Object



11
12
13
14
15
16
17
# File 'brew/Library/Homebrew/rubocops/cask/mixin/on_homepage_stanza.rb', line 11

def on_cask(cask_block)
  @cask_block = cask_block

  toplevel_stanzas.select(&:homepage?).each do |stanza|
    on_homepage_stanza(stanza)
  end
end