Class: SuperDiff::RSpec::MatcherTextBuilders::Match

Inherits:
Base
  • Object
show all
Defined in:
lib/super_diff/rspec/matcher_text_builders/match.rb

Instance Method Summary collapse

Methods inherited from Base

#call, #matcher_description

Constructor Details

#initialize(expected_captures:, **rest) ⇒ Match

Returns a new instance of Match.



7
8
9
10
# File 'lib/super_diff/rspec/matcher_text_builders/match.rb', line 7

def initialize(expected_captures:, **rest)
  super(**rest)
  @expected_captures = expected_captures
end

Instance Method Details

#add_extraObject



12
13
14
15
16
17
# File 'lib/super_diff/rspec/matcher_text_builders/match.rb', line 12

def add_extra
  return unless expected_captures

  template.add_text 'with captures '
  template.add_text_in_color :blue, description_of(expected_captures)
end