From 3b4ee58c491f164c2751c1c0f941568c35fb0ac6 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 26 Jun 2017 07:30:28 +0200 Subject: Refactor using `Forwardable` and `DelegateClass`. --- Library/Homebrew/formula_installer.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Library/Homebrew/formula_installer.rb') diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index a365c967a..27786e77e 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -17,6 +17,7 @@ require "development_tools" class FormulaInstaller include FormulaCellarChecks + extend Predicable def self.mode_attr_accessor(*names) attr_accessor(*names) @@ -559,11 +560,11 @@ class FormulaInstaller audit_installed if ARGV.homebrew_developer? && !formula.keg_only? - c = Caveats.new(formula) + caveats = Caveats.new(formula) - return if c.empty? + return if caveats.empty? @show_summary_heading = true - ohai "Caveats", c.caveats + ohai "Caveats", caveats.to_s end def finish @@ -879,9 +880,7 @@ class FormulaInstaller private - def hold_locks? - @hold_locks || false - end + attr_predicate :hold_locks? def lock return unless (@@locked ||= []).empty? -- cgit v1.2.3