Remove redundant selfs.
This commit is contained in:
parent
ad8ae33c1f
commit
9f513cc60c
@ -73,8 +73,7 @@ module Hbc
|
||||
}.freeze
|
||||
|
||||
def self.command_classes
|
||||
@command_classes ||= self.constants
|
||||
.map(&method(:const_get))
|
||||
@command_classes ||= constants.map(&method(:const_get))
|
||||
.select { |sym| sym.respond_to?(:run) }
|
||||
end
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user