123456789_123456789_123456789_123456789_123456789_

Class: Gem::Resolver::Molinillo::DependencyState

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ResolutionState, Struct
Instance Chain:
self, ResolutionState, Struct
Inherits: Gem::Resolver::Molinillo::ResolutionState
Defined in: lib/rubygems/resolver/molinillo/lib/molinillo/state.rb

Overview

A state that encapsulates a set of #requirements with an Array of possibilities

Class Method Summary

ResolutionState - Inherited

.empty

Returns an empty resolution state.

Instance Attribute Summary

ResolutionState - Inherited

#activated

A state that a Resolution can be in.

#conflicts

A state that a Resolution can be in.

#depth

A state that a Resolution can be in.

#name

A state that a Resolution can be in.

#possibilities

A state that a Resolution can be in.

#requirement

A state that a Resolution can be in.

#requirements

A state that a Resolution can be in.

#unused_unwind_options

A state that a Resolution can be in.

Instance Method Summary

Instance Method Details

#pop_possibility_statePossibilityState

Removes a possibility from self

Returns:

  • (PossibilityState)

    a state with a single possibility, the possibility that was removed from ‘self`

[ GitHub ]

  
# File 'lib/rubygems/resolver/molinillo/lib/molinillo/state.rb', line 38

def pop_possibility_state
  PossibilityState.new(
    name,
    requirements.dup,
    activated,
    requirement,
    [possibilities.pop],
    depth + 1,
    conflicts.dup,
    unused_unwind_options.dup
  ).tap do |state|
    state.activated.tag(state)
  end
end