Class: InchCI::Diff

Inherits:
Object
  • Object
show all
Defined in:
lib/inch_ci/diff.rb

Defined Under Namespace

Classes: CompareCodeObjects

Instance Method Summary collapse

Constructor Details

#initialize(objects1, objects2) ⇒ Diff

Returns a new instance of Diff.


3
4
5
# File 'lib/inch_ci/diff.rb', line 3

def initialize(objects1, objects2)
  @objects1, @objects2 = objects1, objects2
end

Instance Method Details

#comparisonsObject


7
8
9
10
11
12
13
# File 'lib/inch_ci/diff.rb', line 7

def comparisons
  __objects_names.map do |fullname|
    object1 = @objects1.detect { |o| o.fullname == fullname }
    object2 = @objects2.detect { |o| o.fullname == fullname }
    CompareCodeObjects.new(object1, object2)
  end
end