diff options
| author | Josh Hagins | 2016-10-10 10:48:04 -0400 |
|---|---|---|
| committer | Josh Hagins | 2016-10-24 16:21:08 -0400 |
| commit | 5b64fa6fb179bee5e45e16bb4f860579d76d4210 (patch) | |
| tree | b49d61b1b51dfe0acd7281c8269825e0d0a05849 | |
| parent | 9628a613cfe75669c180bf78d086f0372efce30e (diff) | |
| download | brew-5b64fa6fb179bee5e45e16bb4f860579d76d4210.tar.bz2 | |
metafiles: convert Metafiles class to module
| -rw-r--r-- | Library/Homebrew/metafiles.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/metafiles.rb b/Library/Homebrew/metafiles.rb index bff8c0344..96fa086f4 100644 --- a/Library/Homebrew/metafiles.rb +++ b/Library/Homebrew/metafiles.rb @@ -1,6 +1,6 @@ require "set" -class Metafiles +module Metafiles # https://github.com/github/markup#markups EXTENSIONS = Set.new %w[ .adoc .asc .asciidoc .creole .html .markdown .md .mdown .mediawiki .mkdn @@ -11,12 +11,14 @@ class Metafiles news notes notice readme todo ].freeze - def self.list?(file) + module_function + + def list?(file) return false if %w[.DS_Store INSTALL_RECEIPT.json].include?(file) !copy?(file) end - def self.copy?(file) + def copy?(file) file = file.downcase ext = File.extname(file) file = File.basename(file, ext) if EXTENSIONS.include?(ext) |
