Sha256: f88a7d21da62454ec3d6497f17ca56f74b12ccf729dd9f3cce91a13f25964fb2

Contents?: true

Size: 922 Bytes

Versions: 3

Compression:

Stored size: 922 Bytes

Contents

# frozen_string_literal: true
module Gem::Resolver::Molinillo
  class DependencyGraph
    # An action that modifies a {DependencyGraph} that is reversible.
    # @abstract
    class Action
      # rubocop:disable Lint/UnusedMethodArgument

      # @return [Symbol] The name of the action.
      def self.name
        raise 'Abstract'
      end

      # Performs the action on the given graph.
      # @param  [DependencyGraph] graph the graph to perform the action on.
      # @return [Void]
      def up(graph)
        raise 'Abstract'
      end

      # Reverses the action on the given graph.
      # @param  [DependencyGraph] graph the graph to reverse the action on.
      # @return [Void]
      def down(graph)
        raise 'Abstract'
      end

      # @return [Action,Nil] The previous action
      attr_accessor :previous

      # @return [Action,Nil] The next action
      attr_accessor :next
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubygems-update-2.6.7 lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb
rubygems-update-2.6.6 lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb
rubygems-update-2.6.5 lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb