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