Class: RSpec::Support::HunkGenerator
- Inherits:
-
Object
- Object
- RSpec::Support::HunkGenerator
- Defined in:
- lib/rspec/support/hunk_generator.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.
8 9 10 11 |
# File 'lib/rspec/support/hunk_generator.rb', line 8 def initialize(actual, expected) @actual = actual @expected = expected end |
Instance Method Details
#hunks ⇒ Object
13 14 15 16 17 18 |
# File 'lib/rspec/support/hunk_generator.rb', line 13 def hunks @file_length_difference = 0 @hunks ||= diffs.map do |piece| build_hunk(piece) end end |