Class: SuperDiff::RSpec::ObjectInspection::InspectionTreeBuilders::GenericDescribableMatcher

Inherits:
ObjectInspection::InspectionTreeBuilders::Base show all
Defined in:
lib/super_diff/rspec/object_inspection/inspection_tree_builders/generic_describable_matcher.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.applies_to?(value) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/super_diff/rspec/object_inspection/inspection_tree_builders/generic_describable_matcher.rb', line 6

def self.applies_to?(value)
  ::RSpec::Matchers.is_a_describable_matcher?(value)
end

Instance Method Details

#callObject



10
11
12
13
14
# File 'lib/super_diff/rspec/object_inspection/inspection_tree_builders/generic_describable_matcher.rb', line 10

def call
  SuperDiff::ObjectInspection::InspectionTree.new do |t1|
    t1.add_text "#<#{object.description}>"
  end
end