class RSpec::Matchers::MatcherDelegator
Provides the necessary plumbing to wrap a matcher with a decorator. @private
Attributes
base_matcher[R]
Public Class Methods
new(base_matcher)
click to toggle source
# File lib/rspec/matchers/matcher_delegator.rb, line 9 def initialize(base_matcher) @base_matcher = base_matcher end
Public Instance Methods
initialize_copy(other)
click to toggle source
Calls superclass method
# File lib/rspec/matchers/matcher_delegator.rb, line 29 def initialize_copy(other) @base_matcher = @base_matcher.clone super end
method_missing(*args, &block)
click to toggle source
# File lib/rspec/matchers/matcher_delegator.rb, line 13 def method_missing(*args, &block) base_matcher.__send__(*args, &block) end
respond_to?(name, include_all=false)
click to toggle source
:nocov:
Calls superclass method
RSpec::Matchers#respond_to?
# File lib/rspec/matchers/matcher_delegator.rb, line 23 def respond_to?(name, include_all=false) super || base_matcher.respond_to?(name, include_all) end
respond_to_missing?(name, include_all=false)
click to toggle source
Calls superclass method
RSpec::Matchers#respond_to_missing?
# File lib/rspec/matchers/matcher_delegator.rb, line 18 def respond_to_missing?(name, include_all=false) super || base_matcher.respond_to?(name, include_all) end