A matcher responding to #===. Useful for case clauses, grep, etc. See like?.
case obj when Path.like then Path(obj) # ... end
36 37 38 39 40 41 42 43 44
# File 'lib/path/identity.rb', line 36 def like @like ||= begin matcher = Object.new def matcher.===(object) Path.like?(object) end matcher end end