diff options
| author | Adam Malczewski <[email protected]> | 2026-04-01 23:14:45 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-04-01 23:14:45 +0900 |
| commit | a57cb89b3546845e9db2fcd45e4a8f16ade09b31 (patch) | |
| tree | be3b186e8474f8cf79c464fe0fb35eca40614a64 /lib/dispatch/tools/definition.rb | |
| parent | cc97aeb35f8e0f61a13ee28b94355afa7c884281 (diff) | |
| download | dispatch-tools-interface-dev.tar.gz dispatch-tools-interface-dev.zip | |
minor updatedev
Diffstat (limited to 'lib/dispatch/tools/definition.rb')
| -rw-r--r-- | lib/dispatch/tools/definition.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/dispatch/tools/definition.rb b/lib/dispatch/tools/definition.rb index 2e386f0..372f0e3 100644 --- a/lib/dispatch/tools/definition.rb +++ b/lib/dispatch/tools/definition.rb @@ -19,9 +19,7 @@ module Dispatch symbolized = symbolize_keys(params) valid, errors = validate_params(params) - unless valid - return Result.failure(error: "Parameter validation failed: #{errors.join('; ')}") - end + return Result.failure(error: "Parameter validation failed: #{errors.join("; ")}") unless valid begin @block.call(symbolized, context) @@ -43,9 +41,9 @@ module Dispatch errors = @schemer.validate(stringified).map { |err| err["error"] || err.fetch("type", "unknown error") } if errors.empty? - [true, []] + [ true, [] ] else - [false, errors] + [ false, errors ] end end |
