Class: FlexMock::OptionalProcMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/flexmock/argument_matchers.rb

Overview

Match objects that implement all the methods in methods.

Instance Method Summary collapse

Constructor Details

#initializeOptionalProcMatcher

Returns a new instance of OptionalProcMatcher.



87
88
# File 'lib/flexmock/argument_matchers.rb', line 87

def initialize
end

Instance Method Details

#===(target) ⇒ Object



89
90
91
# File 'lib/flexmock/argument_matchers.rb', line 89

def ===(target)
  ArgumentMatching.missing?(target) || Proc === target
end

#inspectObject



92
93
94
# File 'lib/flexmock/argument_matchers.rb', line 92

def inspect
  "optional_proc"
end