123456789_123456789_123456789_123456789_123456789_

Class: Bundler::PubGrub::StaticPackageSource

Relationships & Source Files
Namespace Children
Classes:
DSL
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Bundler::PubGrub::BasicPackageSource
Defined in: lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb

Class Method Summary

Instance Method Summary

Constructor Details

.new {|DSL.new(@packages, @root_deps)| ... } ⇒ StaticPackageSource

Yields:

  • (DSL.new(@packages, @root_deps))
[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb', line 34

def initialize
  @root_deps = {}
  @packages = {}

  yield DSL.new(@packages, @root_deps)

  super()
end

Instance Method Details

#all_versions_for(package)

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb', line 43

def all_versions_for(package)
  @packages[package].keys
end

#dependencies_for(package, version)

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb', line 51

def dependencies_for(package, version)
  @packages[package][version]
end

#parse_dependency(package, dependency)

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb', line 55

def parse_dependency(package, dependency)
  return false unless @packages.key?(package)

  Bundler::PubGrub::RubyGems.parse_constraint(package, dependency)
end

#root_dependencies

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb', line 47

def root_dependencies
  @root_deps
end