Skip to content
Snippets Groups Projects
Commit 9f513cc6 authored by Markus Reiter's avatar Markus Reiter
Browse files

Remove redundant `self`s.

parent ad8ae33c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment