Class: MiniSpec::Differ::HunkGenerator
- Inherits:
-
Object
- Object
- MiniSpec::Differ::HunkGenerator
- Defined in:
- lib/minispec/utils/differ.rb
Instance Method Summary collapse
- #hunks ⇒ Object
-
#initialize(actual, expected) ⇒ HunkGenerator
constructor
A new instance of HunkGenerator.
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
#hunks ⇒ Object
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 |