diff options
| author | Jack Nagel | 2014-04-01 21:35:22 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-01 21:35:22 -0500 |
| commit | 93d58e0eb3797604af0279db76717df4947fbda8 (patch) | |
| tree | d1b31ec127055303af5dde06efa9b60e28637ef2 /Library | |
| parent | 9b96c330e0df97645ea349164a582239cd9c8762 (diff) | |
| download | homebrew-93d58e0eb3797604af0279db76717df4947fbda8.tar.bz2 | |
Make keg_only validation lazy
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_support.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index d70a0aa59..7efda3564 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -8,14 +8,15 @@ class KegOnlyReason def initialize reason, explanation=nil @reason = reason @explanation = explanation - @valid = case @reason - when :provided_pre_mountain_lion then MacOS.version < :mountain_lion - else true - end end def valid? - @valid + case @reason + when :provided_pre_mountain_lion + MacOS.version < :mountain_lion + else + true + end end def to_s |
