Class: Appraisal::DependencyList

Inherits:
Object
  • Object
show all
Defined in:
lib/appraisal/dependency_list.rb

Instance Method Summary collapse

Constructor Details

#initializeDependencyList

Returns a new instance of DependencyList


6
7
8
# File 'lib/appraisal/dependency_list.rb', line 6

def initialize
  @dependencies = OrderedHash.new
end

Instance Method Details

#add(name, requirements) ⇒ Object


10
11
12
# File 'lib/appraisal/dependency_list.rb', line 10

def add(name, requirements)
  @dependencies[name] = Dependency.new(name, requirements)
end

#for_dupObject

:nodoc:


19
20
21
# File 'lib/appraisal/dependency_list.rb', line 19

def for_dup
  @dependencies.values.map(&:for_dup).join("\n")
end

#to_sObject


14
15
16
# File 'lib/appraisal/dependency_list.rb', line 14

def to_s
  @dependencies.values.map(&:to_s).join("\n")
end