Class: Bundler::Resolver::SpecGroup

### Home Classes Methods

### In Files

- lib/bundler/resolver.rb

### Parent

Array

### Methods

- ::new
- #activate_platform
- #for?
- #initialize_copy
- #name
- #source
- #to_s
- #to_specs
- #version

### Included Modules

- Bundler::GemHelpers

### Files

- bundle
- bundle-config
- bundle-config.txt
- bundle-exec
- bundle-exec.txt
- bundle-install
- bundle-install.txt
- bundle-package
- bundle-package.txt
- bundle-platform
- bundle-platform.txt
- bundle-update
- bundle-update.txt
- bundle.txt
- gemfile.5.txt
- Executable
- Gemfile

### Class/Module Index

Quicksearch

- Bundler
- Bundler::BundlerError
- Bundler::CLI
- Bundler::Definition
- Bundler::DepProxy
- Bundler::Dependency
- Bundler::Deployment
- Bundler::Deprecate
- Bundler::DeprecatedError
- Bundler::Dsl
- Bundler::EndpointSpecification
- Bundler::Env
- Bundler::Environment
- Bundler::Fetcher
- Bundler::Fetcher::CertificateFailureError
- Bundler::Fetcher::FallbackError
- Bundler::Fetcher::SSLError
- Bundler::GemHelper
- Bundler::GemHelpers
- Bundler::GemInstaller
- Bundler::GemNotFound
- Bundler::GemfileError
- Bundler::GemfileNotFound
- Bundler::GemspecError
- Bundler::GitError
- Bundler::Graph
- Bundler::Graph::GraphVizClient
- Bundler::HTTPError
- Bundler::Index
- Bundler::Injector
- Bundler::InstallError
- Bundler::InstallHookError
- Bundler::Installer
- Bundler::InvalidOption
- Bundler::InvalidSpecSet
- Bundler::LazySpecification
- Bundler::LockfileError
- Bundler::LockfileParser
- Bundler::MarshalError
- Bundler::MatchPlatform
- Bundler::PathError
- Bundler::ProductionError
- Bundler::RemoteSpecification
- Bundler::Resolver
- Bundler::Resolver::SpecGroup
- Bundler::RubyDsl
- Bundler::RubyVersion
- Bundler::RubyVersionMismatch
- Bundler::RubygemsIntegration
- Bundler::RubygemsIntegration::AlmostModern
- Bundler::RubygemsIntegration::Ancient
- Bundler::RubygemsIntegration::Future
- Bundler::RubygemsIntegration::Gem
- Bundler::RubygemsIntegration::Gem::SourceIndex
- Bundler::RubygemsIntegration::Legacy
- Bundler::RubygemsIntegration::Modern
- Bundler::RubygemsIntegration::Transitional
- Bundler::Runtime
- Bundler::SecurityError
- Bundler::Settings
- Bundler::SharedHelpers
- Bundler::SimilarityDetector
- Bundler::Source
- Bundler::Source::Git
- Bundler::Source::Git::GitProxy
- Bundler::Source::Path
- Bundler::Source::Path::Installer
- Bundler::Source::Rubygems
- Bundler::SpecSet
- Bundler::SystemRubyVersion
- Bundler::UI
- Bundler::UI::RGProxy
- Bundler::UI::Shell
- Bundler::VersionConflict
- Gem
- Gem::Dependency
- Gem::Platform
- Gem::Requirement
- Gem::Specification
- Object

No matching classes.

# Bundler::Resolver::SpecGroup

### Attributes

activated[R]
required_by[R]

### Public Class Methods

new(a) click to toggle source

    # File lib/bundler/resolver.rb, line 31
    def initialize(a)
      super
      @required_by  = []
      @activated    = []
      @dependencies = nil
      @specs        = {}

      ALL.each do |p|
        @specs[p] = reverse.find { |s| s.match_platform(p) }
      end
    end

### Public Instance Methods

activate_platform(platform) click to toggle source

    # File lib/bundler/resolver.rb, line 65
    def activate_platform(platform)
      unless @activated.include?(platform)
        @activated << platform
        return __dependencies[platform] || []
      end
      []
    end

for?(platform) click to toggle source

    # File lib/bundler/resolver.rb, line 85
    def for?(platform)
      @specs[platform]
    end

initialize_copy(o) click to toggle source

    # File lib/bundler/resolver.rb, line 43
    def initialize_copy(o)
      super
      @required_by = o.required_by.dup
      @activated   = o.activated.dup
    end

name() click to toggle source

    # File lib/bundler/resolver.rb, line 73
    def name
      @name ||= first.name
    end

source() click to toggle source

    # File lib/bundler/resolver.rb, line 81
    def source
      @source ||= first.source
    end

to_s() click to toggle source

    # File lib/bundler/resolver.rb, line 89
    def to_s
      "#{name} (#{version})"
    end

to_specs() click to toggle source

    # File lib/bundler/resolver.rb, line 49
    def to_specs
      specs = {}

      @activated.each do |p|
        if s = @specs[p]
          platform = generic(Gem::Platform.new(s.platform))
          next if specs[platform]

          lazy_spec = LazySpecification.new(name, version, platform, source)
          lazy_spec.dependencies.replace s.dependencies
          specs[platform] = lazy_spec
        end
      end
      specs.values
    end

version() click to toggle source

    # File lib/bundler/resolver.rb, line 77
    def version
      @version ||= first.version
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.