Class: Transdeps::Reconciler

Inherits:
Struct
  • Object
show all
Defined in:
lib/transdeps/reconciler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(spec_list_factory = SpecListFactory.new, component_discoverer = DefaultComponentDiscoverer.new) ⇒ Reconciler

Returns a new instance of Reconciler.



7
8
9
# File 'lib/transdeps/reconciler.rb', line 7

def initialize(spec_list_factory=SpecListFactory.new, component_discoverer=DefaultComponentDiscoverer.new)
  super
end

Instance Attribute Details

#component_discovererObject

Returns the value of attribute component_discoverer

Returns:

  • (Object)

    the current value of component_discoverer



6
7
8
# File 'lib/transdeps/reconciler.rb', line 6

def component_discoverer
  @component_discoverer
end

#spec_list_factoryObject

Returns the value of attribute spec_list_factory

Returns:

  • (Object)

    the current value of spec_list_factory



6
7
8
# File 'lib/transdeps/reconciler.rb', line 6

def spec_list_factory
  @spec_list_factory
end

Instance Method Details

#call(component_dir, project_dir) ⇒ Object



11
12
13
14
15
16
# File 'lib/transdeps/reconciler.rb', line 11

def call(component_dir, project_dir)
  project_specs = specs_for(project_dir)
  all_component_specs = all_component_specs(component_dir)

  spec_differences(project_specs, all_component_specs)
end