class RSpec::Matchers::BuiltIn::Match

@api private Provides the implementation for `match`. Not intended to be instantiated directly.

Public Instance Methods

description() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/match.rb, line 10
def description
  "match #{surface_descriptions_in(expected).inspect}"
end
diffable?() click to toggle source

@api private @return [Boolean]

# File lib/rspec/matchers/built_in/match.rb, line 16
def diffable?
  true
end

Private Instance Methods

match(expected, actual) click to toggle source
# File lib/rspec/matchers/built_in/match.rb, line 22
def match(expected, actual)
  return true if values_match?(expected, actual)
  actual.match(expected) if actual.respond_to?(:match)
end