Sha256: fa1ceafe426cb879c9d289f4db031051e29f4cce3d9d9aaebc90b8ec8edcb3b6

Contents?: true

Size: 1.03 KB

Versions: 4

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

module SmartCore::Container::DependencyCompatability
  # @api private
  # @since 0.5.0
  class CommandSet < Abstract
    class << self
      # @param command_set [SmartCore::Container::CommandSet]
      # @param dependency_name [String]
      # @return [Boolean]
      #
      # @api private
      # @since 0.5.0
      def potential_namespace_overlap?(command_set, dependency_name)
        command_set.any? do |command|
          next unless command.is_a?(SmartCore::Container::Commands::Namespace)
          command.namespace_name == dependency_name
        end
      end

      # @param command_set [SmartCore::Container::CommandSet]
      # @param namespace_name [String]
      # @return [Boolean]
      #
      # @api private
      # @since 0.5.0
      def potential_dependency_overlap?(command_set, namespace_name)
        command_set.any? do |command|
          next unless command.is_a?(SmartCore::Container::Commands::Register)
          command.dependency_name == namespace_name
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
smart_core-0.6.0 lib/smart_core/container/dependency_compatability/command_set.rb
smart_core-0.5.2 lib/smart_core/container/dependency_compatability/command_set.rb
smart_core-0.5.1 lib/smart_core/container/dependency_compatability/command_set.rb
smart_core-0.5.0 lib/smart_core/container/dependency_compatability/command_set.rb