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.
10 11 12 13 |
# File 'lib/rspec/support/hunk_generator.rb', line 10 def initialize(actual, expected) @actual = actual @expected = expected end |
Instance Method Details
#hunks ⇒ Object
15 16 17 18 19 20 |
# File 'lib/rspec/support/hunk_generator.rb', line 15 def hunks @file_length_difference = 0 @hunks ||= diffs.map do |piece| build_hunk(piece) end end |