Class: MiniSpec::Differ::HunkGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/minispec/utils/differ.rb

Instance Method Summary collapse

Constructor Details

#initialize(actual, expected) ⇒ HunkGenerator

Returns a new instance of HunkGenerator.



91
92
93
94
# File 'lib/minispec/utils/differ.rb', line 91

def initialize(actual, expected)
  @actual = actual
  @expected = expected
end

Instance Method Details

#hunksObject



96
97
98
99
100
101
# File 'lib/minispec/utils/differ.rb', line 96

def hunks
  @file_length_difference = 0
  @hunks ||= diffs.map do |piece|
    build_hunk(piece)
  end
end