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