Module: Regent::Concerns::Toolable

Included in:
Agent
Defined in:
lib/regent/concerns/toolable.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/regent/concerns/toolable.rb', line 6

def self.included(base)
  base.class_eval do
    class << self
      def tool(name, description)
        @function_tools ||= []
        @function_tools << { name: name, description: description }
      end

      def function_tools
        @function_tools || []
      end
    end
  end
end