Sha256: 9c57c45e7427811ab37a4e3177d05dba4d86ef54144027c9949839273bf7420f

Contents?: true

Size: 722 Bytes

Versions: 106

Compression:

Stored size: 722 Bytes

Contents

module Standard
  module Plugin
    class InitializesPlugins
      def initialize
        @standardizes_configured_plugins = StandardizesConfiguredPlugins.new
        @determines_class_constants = DeterminesClassConstant.new
      end

      def call(plugins)
        plugin_configs = @standardizes_configured_plugins.call(plugins)
        plugin_configs.map { |name_or_class, user_config|
          if user_config["enabled"]
            if name_or_class.is_a?(String) || name_or_class.is_a?(Symbol)
              @determines_class_constants.call(name_or_class, user_config).new(user_config)
            else
              name_or_class.new(user_config)
            end
          end
        }
      end
    end
  end
end

Version data entries

106 entries across 106 versions & 3 rubygems

Version Path
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.2.0 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.1.99 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.1.98 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.1.97 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.1.96 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.1.95 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.1.94 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.1.93 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.1.91 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.1.90 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb
harbr-0.1.89 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/plugin/initializes_plugins.rb