Class: Hbc::Auditor

Inherits:
Object
  • Object
show all
Defined in:
Library/Homebrew/cask/lib/hbc/auditor.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cask, audit_download, check_token_conflicts, commit_range) ⇒ Auditor

Returns a new instance of Auditor



9
10
11
12
13
14
# File 'Library/Homebrew/cask/lib/hbc/auditor.rb', line 9

def initialize(cask, audit_download, check_token_conflicts, commit_range)
  @cask = cask
  @audit_download = audit_download
  @commit_range = commit_range
  @check_token_conflicts = check_token_conflicts
end

Instance Attribute Details

#caskObject (readonly)

Returns the value of attribute cask



7
8
9
# File 'Library/Homebrew/cask/lib/hbc/auditor.rb', line 7

def cask
  @cask
end

#commit_rangeObject (readonly)

Returns the value of attribute commit_range



7
8
9
# File 'Library/Homebrew/cask/lib/hbc/auditor.rb', line 7

def commit_range
  @commit_range
end

Class Method Details

.audit(cask, audit_download: false, check_token_conflicts: false, commit_range: nil) ⇒ Object



3
4
5
# File 'Library/Homebrew/cask/lib/hbc/auditor.rb', line 3

def self.audit(cask, audit_download: false, check_token_conflicts: false, commit_range: nil)
  new(cask, audit_download, check_token_conflicts, commit_range).audit
end

Instance Method Details

#auditObject



24
25
26
27
28
29
30
# File 'Library/Homebrew/cask/lib/hbc/auditor.rb', line 24

def audit
  if !ARGV.value("language") && language_blocks
    audit_all_languages
  else
    audit_cask_instance(cask)
  end
end

#audit_download?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'Library/Homebrew/cask/lib/hbc/auditor.rb', line 16

def audit_download?
  @audit_download
end

#check_token_conflicts?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'Library/Homebrew/cask/lib/hbc/auditor.rb', line 20

def check_token_conflicts?
  @check_token_conflicts
end