aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2014-06-07 17:45:13 -0500
committerJack Nagel2014-06-07 21:15:54 -0500
commitc017f0badd64964967ff579b8d5a1790c3b6df3c (patch)
treeaab13c2b5e7cf55a6909d7c52533dd2d58b406a0 /Library/Homebrew
parent48d80dd9881185b91b96d9c6096f64290dcc6255 (diff)
downloadhomebrew-c017f0badd64964967ff579b8d5a1790c3b6df3c.tar.bz2
metafiles: extract constant arrays
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/metafiles.rb18
1 files changed, 8 insertions, 10 deletions
diff --git a/Library/Homebrew/metafiles.rb b/Library/Homebrew/metafiles.rb
index 9f740781f..9870aea2b 100644
--- a/Library/Homebrew/metafiles.rb
+++ b/Library/Homebrew/metafiles.rb
@@ -1,11 +1,9 @@
class Metafiles
-
- def initialize
- @exts = %w[.md .html .rtf .txt]
- @metafiles = %w[
- about authors changelog changes copying copyright history license
- licence news notes notice readme todo]
- end
+ EXTENSIONS = %w[.md .html .rtf .txt]
+ BASENAMES = %w[
+ about authors changelog changes copying copyright history license licence
+ news notes notice readme todo
+ ]
def + other
@metafiles + other
@@ -27,11 +25,11 @@ class Metafiles
ext = File.extname(path)
if EXTENSIONS.include?(ext)
- file = File.basename(path, ext)
+ basename = File.basename(path, ext)
else
- file = File.basename(path)
+ basename = File.basename(path)
end
- return @metafiles.include?(file)
+ return BASENAMES.include?(basename)
end
end