diff options
| author | Markus Reiter | 2017-07-01 05:32:19 +0200 |
|---|---|---|
| committer | GitHub | 2017-07-01 05:32:19 +0200 |
| commit | fd5e673d2d367eff03f1411d909ca0bbb2003a2c (patch) | |
| tree | f908de0884ea7048aa79caedc726ef8a8cc12818 /Library/Homebrew/formula_installer.rb | |
| parent | 0a5052141d59ece4adb3c9dbd62096c7a2ed7282 (diff) | |
| parent | 6a1fa87191bfef31ff1b2d47d3ebf281398a210f (diff) | |
| download | brew-fd5e673d2d367eff03f1411d909ca0bbb2003a2c.tar.bz2 | |
Merge pull request #2825 from reitermarkus/refactoring
Refactoring using `Forwardable` and `DelegateClass`.
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 11 |
1 files changed, 5 insertions, 6 deletions
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? |
