Sha256: 827045e67418479d16e0cec6aefce78b51cd9f199421d6b8abc4f7c0871a5859
Contents?: true
Size: 816 Bytes
Versions: 33
Compression:
Stored size: 816 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 def respond_to?(name, include_all=false) super || base_matcher.respond_to?(name, include_all) end end def initialize_copy(other) @base_matcher = @base_matcher.clone super end end end end
Version data entries
33 entries across 30 versions & 9 rubygems