Method: Fear::Either.matcher
- Defined in:
- lib/fear/either.rb
.matcher {|| ... } ⇒ Fear::PartialFunction
Build pattern matcher to be used later, despite off Either#match method, id doesn’t apply matcher immanently, but build it instead. Unusually in sake of efficiency it’s better to statically build matcher and reuse it later.
314 315 316 |
# File 'lib/fear/either.rb', line 314 def matcher(&matcher) Either::PatternMatch.new(&matcher) end |