diff options
| author | Markus Reiter | 2016-09-26 01:44:51 +0200 | 
|---|---|---|
| committer | Markus Reiter | 2016-10-02 00:24:47 +0200 | 
| commit | 0ab750bf24dac2cb411d76c05a0edb9b1f1b9333 (patch) | |
| tree | b442b10ea2d0a02fb1c90c59d64c953affc14b0e /Library/Homebrew/cmd/commands.rb | |
| parent | fa14c262454c2678ca9c8a1caa2f0080833ac67a (diff) | |
| download | brew-0ab750bf24dac2cb411d76c05a0edb9b1f1b9333.tar.bz2 | |
Use `module_function` for commands.
Diffstat (limited to 'Library/Homebrew/cmd/commands.rb')
| -rw-r--r-- | Library/Homebrew/cmd/commands.rb | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/Library/Homebrew/cmd/commands.rb b/Library/Homebrew/cmd/commands.rb index 4fad764ca..34f0b14e9 100644 --- a/Library/Homebrew/cmd/commands.rb +++ b/Library/Homebrew/cmd/commands.rb @@ -5,6 +5,8 @@  #:    With `--include-aliases`, the aliases of internal commands will be included.  module Homebrew +  module_function +    def commands      if ARGV.include? "--quiet"        cmds = internal_commands + external_commands @@ -48,11 +50,10 @@ module Homebrew      end.sort    end -  private -    def find_internal_commands(directory)      directory.children.each_with_object([]) do |f, cmds|        cmds << f.basename.to_s.sub(/\.(?:rb|sh)$/, "") if f.file?      end    end +  private_class_method :find_internal_commands  end | 
