lib/dry/mutations/predicates.rb
FIXME found Open
Open
# FIXME: at the moment this is an exact equivalent of :type? => User
- Exclude checks
Favor a normal unless-statement over a modifier clause in a multiline statement. Open
Open
expected = begin
::Kernel.const_get(expected)
rescue TypeError => e
raise Errors::TypeError, "Bad “model” type. Error: [#{e.message}]"
rescue NameError => e
- Read upRead up
- Exclude checks
Checks for uses of if/unless modifiers with multiple-lines bodies.
Example:
# bad
{
result: 'this should not happen'
} unless cond
# good
{ result: 'ok' } if cond