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

Extended by:
Forwardable
Includes:
CaskHelp
Included in:
HomepageUrlTrailingSlash
Defined in:
lib/rubocop/cop/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



9
10
11
12
13
14
15
# File 'lib/rubocop/cop/cask/mixin/on_homepage_stanza.rb', line 9

def on_cask(cask_block)
  @cask_block = cask_block

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