Ran rubocop autocorrect

This commit is contained in:
2020-12-02 17:37:48 -06:00
parent aa30ff73d0
commit 95bea199ed
116 changed files with 758 additions and 575 deletions

View File

@@ -1,26 +1,27 @@
# frozen_string_literal: true
class IMICFPS
class Component
COMPONENTS = {}
@components = {}
def self.get(name)
COMPONENTS.dig(name)
@components[name]
end
def self.inherited(subclass)
COMPONENTS["__pending"] ||= []
COMPONENTS["__pending"] << subclass
@components["__pending"] ||= []
@components["__pending"] << subclass
end
def self.initiate
return unless COMPONENTS.dig("__pending") # Already setup
return unless @components["__pending"] # Already setup
COMPONENTS["__pending"].each do |klass|
@components["__pending"].each do |klass|
component = klass.new
COMPONENTS[component.name] = component
@components[component.name] = component
end
COMPONENTS.delete("__pending")
@components.delete("__pending")
end
def initialize
@@ -31,12 +32,10 @@ class IMICFPS
string = self.class.name.split("::").last
split = string.scan(/[A-Z][a-z]*/)
component_name = "#{split.map { |s| s.downcase }.join("_")}".to_sym
return component_name
split.map(&:downcase).join("_").to_s.to_sym
end
def setup
end
end
end
end