Class: Deterministic::PatternMatching::Match::Matcher
- Inherits:
-
Struct
- Object
- Struct
- Deterministic::PatternMatching::Match::Matcher
- Defined in:
- lib/deterministic/either/match.rb
Instance Method Summary collapse
Instance Method Details
#matches?(value) ⇒ Boolean
38 39 40 |
# File 'lib/deterministic/either/match.rb', line 38 def matches?(value) condition.call(value) end |
#result(value) ⇒ Object
42 43 44 |
# File 'lib/deterministic/either/match.rb', line 42 def result(value) block.call(value) end |