Sha256: cdad1737ecae7e5f2bf4268b7ad6138d76babadd5e9183bdd132ddd41e38a701

Contents?: true

Size: 852 Bytes

Versions: 5331

Compression:

Stored size: 852 Bytes

Contents

module RSpec
  module Matchers
    # Provides the necessary plumbing to wrap a matcher with a decorator.
    # @private
    class MatcherDelegator
      include Composable
      attr_reader :base_matcher

      def initialize(base_matcher)
        @base_matcher = base_matcher
      end

      def method_missing(*args, &block)
        base_matcher.__send__(*args, &block)
      end

      if ::RUBY_VERSION.to_f > 1.8
        def respond_to_missing?(name, include_all=false)
          super || base_matcher.respond_to?(name, include_all)
        end
      else
        # :nocov:
        def respond_to?(name, include_all=false)
          super || base_matcher.respond_to?(name, include_all)
        end
        # :nocov:
      end

      def initialize_copy(other)
        @base_matcher = @base_matcher.clone
        super
      end
    end
  end
end

Version data entries

5,331 entries across 5,245 versions & 119 rubygems

Version Path
cybrid_api_id_ruby-0.113.100 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_organization_ruby-0.113.100 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_bank_ruby-0.113.99 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_organization_ruby-0.113.99 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_id_ruby-0.113.99 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_bank_ruby-0.113.98 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_organization_ruby-0.113.98 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_id_ruby-0.113.98 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_bank_ruby-0.113.96 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_organization_ruby-0.113.96 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_id_ruby-0.113.96 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_organization_ruby-0.113.95 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_bank_ruby-0.113.95 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_id_ruby-0.113.95 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_bank_ruby-0.113.94 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_organization_ruby-0.113.94 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_id_ruby-0.113.94 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_bank_ruby-0.113.93 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_organization_ruby-0.113.93 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb
cybrid_api_id_ruby-0.113.93 vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.12.3/lib/rspec/matchers/matcher_delegator.rb