Class: LLM::Shell::Functions::WriteFile
- Inherits:
-
Object
- Object
- LLM::Shell::Functions::WriteFile
- Defined in:
- lib/llm/shell/functions/write_file.rb
Instance Method Summary collapse
Instance Method Details
#call(path:, content:) ⇒ Object
5 6 7 8 9 |
# File 'lib/llm/shell/functions/write_file.rb', line 5 def call(path:, content:) {ok: true, content: File.binwrite(path, content)} rescue => ex {ok: false, error: {class: ex.class.to_s, message: ex.}} end |