Class: InchCI::Worker::Project::Build::CalculateDiff

Inherits:
Object
  • Object
show all
Defined in:
lib/inch_ci/worker/project/build/calculate_diff.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(revision1, revision2) ⇒ CalculateDiff


14
15
16
17
18
19
20
21
22
# File 'lib/inch_ci/worker/project/build/calculate_diff.rb', line 14

def initialize(revision1, revision2)
  objects1 = if revision1
      Store::FindCodeObjects.call(revision1)
    else
      []
    end
  objects2 = Store::FindCodeObjects.call(revision2)
  @diff = Diff.new(objects1, objects2)
end

Instance Attribute Details

#diffObject (readonly)

Returns the value of attribute diff


8
9
10
# File 'lib/inch_ci/worker/project/build/calculate_diff.rb', line 8

def diff
  @diff
end

Class Method Details

.call(*args) ⇒ Object


10
11
12
# File 'lib/inch_ci/worker/project/build/calculate_diff.rb', line 10

def self.call(*args)
  new(*args).diff
end