Class: OmniAI::Tools::Disk::BaseTool

Inherits:
OmniAI::Tool
  • Object
show all
Defined in:
lib/omniai/tools/disk/base_tool.rb

Overview

Examples:

class ExampleTool < OmniAI::Tools::Disk::BaseTool
  description "..."
end

Instance Method Summary collapse

Constructor Details

#initialize(root:, logger: Logger.new(IO::NULL)) ⇒ BaseTool

Returns a new instance of BaseTool.

Parameters:

  • root (Pathname)

    The root path for which a tool is able to operate within.

  • logger (IO) (defaults to: Logger.new(IO::NULL))

    An optional logger for debugging executed commands.



13
14
15
16
17
# File 'lib/omniai/tools/disk/base_tool.rb', line 13

def initialize(root:, logger: Logger.new(IO::NULL))
  super()
  @root = Pathname(root)
  @logger = logger
end