Sha256: 892d30dae883ddebada23d833051663dacbe9cc7b63229d272d3cc30ee83746f
Contents?: true
Size: 639 Bytes
Versions: 4
Compression:
Stored size: 639 Bytes
Contents
require 'appraisal/dependency' require "set" module Appraisal class DependencyList def initialize @dependencies = Hash.new @removed_dependencies = Set.new end def add(name, requirements) unless @removed_dependencies.include?(name) @dependencies[name] = Dependency.new(name, requirements) end end def remove(name) if @removed_dependencies.add?(name) @dependencies.delete(name) end end def to_s @dependencies.values.map(&:to_s).join("\n") end # :nodoc: def for_dup @dependencies.values.map(&:for_dup).join("\n") end end end
Version data entries
4 entries across 4 versions & 2 rubygems