class Bundler::PubGrub::StaticPackageSource::DSL
Public Class Methods
new(packages, root_deps)
click to toggle source
# File bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb, line 9 def initialize(packages, root_deps) @packages = packages @root_deps = root_deps end
Public Instance Methods
add(name, version, deps: {})
click to toggle source
# File bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb, line 18 def add(name, version, deps: {}) version = Gem::Version.new(version) @packages[name] ||= {} raise ArgumentError, "#{name} #{version} declared twice" if @packages[name].key?(version) @packages[name][version] = deps end
root(deps:)
click to toggle source
# File bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb, line 14 def root(deps:) @root_deps.update(deps) end