Method: Dry::Transformer::Conditional.is
- Defined in:
- lib/dry/transformer/conditional.rb
.is(value, type, fn) ⇒ Object
Calls a function when type-check passes
72 73 74 |
# File 'lib/dry/transformer/conditional.rb', line 72 def self.is(value, type, fn) guard(value, -> v { v.is_a?(type) }, fn) end |