Class: Bundler::PubGrub::StaticPackageSource
Defined Under Namespace
Classes: DSL
Instance Method Summary
collapse
#incompatibilities_for, #no_versions_incompatibility_for, #sort_versions_by_preferred, #versions_for
Constructor Details
#initialize {|DSL.new(@packages, @root_deps)| ... } ⇒ StaticPackageSource
Returns a new instance of StaticPackageSource.
33
34
35
36
37
38
39
40
|
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb', line 33
def initialize
@root_deps = {}
@packages = {}
yield DSL.new(@packages, @root_deps)
super()
end
|
Instance Method Details
#all_versions_for(package) ⇒ Object
42
43
44
|
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb', line 42
def all_versions_for(package)
@packages[package].keys
end
|
#dependencies_for(package, version) ⇒ Object
50
51
52
|
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb', line 50
def dependencies_for(package, version)
@packages[package][version]
end
|
#parse_dependency(package, dependency) ⇒ Object
54
55
56
57
58
|
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb', line 54
def parse_dependency(package, dependency)
return false unless @packages.key?(package)
Bundler::PubGrub::RubyGems.parse_constraint(package, dependency)
end
|
#root_dependencies ⇒ Object
46
47
48
|
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb', line 46
def root_dependencies
@root_deps
end
|