class FlexMock::DuckMatcher
Match objects that implement all the methods in methods
.
Public Class Methods
Source
# File lib/flexmock/argument_matchers.rb, line 76 def initialize(methods) @methods = methods end
Public Instance Methods
Source
# File lib/flexmock/argument_matchers.rb, line 79 def ===(target) @methods.all? { |m| target.respond_to?(m) } end
Source
# File lib/flexmock/argument_matchers.rb, line 82 def inspect "ducktype(#{@methods.map{|m| m.inspect}.join(',')})" end