diff options
| author | Markus Reiter | 2016-10-14 20:55:09 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-10-23 14:32:04 +0200 |
| commit | 9f513cc60cb6d4875dcd2ef1f53a70d7f41f8fa0 (patch) | |
| tree | 08d8c5d313992c143689152be8515d0211e4ff69 /Library/Homebrew | |
| parent | ad8ae33c1f2bf09cf70944aba0708000adce93e1 (diff) | |
| download | brew-9f513cc60cb6d4875dcd2ef1f53a70d7f41f8fa0.tar.bz2 | |
Remove redundant `self`s.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli.rb | 7 | ||||
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/container.rb | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb index e216c7072..6249fbc7a 100644 --- a/Library/Homebrew/cask/lib/hbc/cli.rb +++ b/Library/Homebrew/cask/lib/hbc/cli.rb @@ -73,9 +73,8 @@ module Hbc }.freeze def self.command_classes - @command_classes ||= self.constants - .map(&method(:const_get)) - .select { |sym| sym.respond_to?(:run) } + @command_classes ||= constants.map(&method(:const_get)) + .select { |sym| sym.respond_to?(:run) } end def self.commands @@ -114,7 +113,7 @@ module Hbc # for development and troubleshooting sym = Pathname.new(command.to_s).basename(".rb").to_s.capitalize klass = begin - self.const_get(sym) + const_get(sym) rescue NameError nil end diff --git a/Library/Homebrew/cask/lib/hbc/container.rb b/Library/Homebrew/cask/lib/hbc/container.rb index 01dd10337..e31fbc8fb 100644 --- a/Library/Homebrew/cask/lib/hbc/container.rb +++ b/Library/Homebrew/cask/lib/hbc/container.rb @@ -59,7 +59,7 @@ module Hbc def self.from_type(type) odebug "Determining which containers to use based on 'container :type'" begin - self.const_get(type.to_s.split("_").map(&:capitalize).join) + const_get(type.to_s.split("_").map(&:capitalize).join) rescue NameError false end |
