Class: SkillBench::Tools::ArgumentParser
- Inherits:
-
Object
- Object
- SkillBench::Tools::ArgumentParser
- Defined in:
- lib/skill_bench/tools/argument_parser.rb
Overview
Parses JSON arguments for tools, handling format errors gracefully.
Class Method Summary collapse
-
.call(arguments) ⇒ Hash, String
Parses a JSON string of arguments.
Class Method Details
.call(arguments) ⇒ Hash, String
Parses a JSON string of arguments.
13 14 15 16 17 |
# File 'lib/skill_bench/tools/argument_parser.rb', line 13 def self.call(arguments) JSON.parse(arguments) rescue JSON::ParserError => e "Error executing tool: Invalid JSON format for arguments. Please correct it. Details: #{e.}" end |