Class: RCrewAI::Process::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rcrewai/process.rb

Direct Known Subclasses

Consensual, Hierarchical, Sequential

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(crew) ⇒ Base

Returns a new instance of Base.



8
9
10
11
12
# File 'lib/rcrewai/process.rb', line 8

def initialize(crew)
  @crew = crew
  @logger = Logger.new($stdout)
  @logger.level = crew.verbose ? Logger::DEBUG : Logger::INFO
end

Instance Attribute Details

#crewObject (readonly)

Returns the value of attribute crew.



6
7
8
# File 'lib/rcrewai/process.rb', line 6

def crew
  @crew
end

#loggerObject (readonly)

Returns the value of attribute logger.



6
7
8
# File 'lib/rcrewai/process.rb', line 6

def logger
  @logger
end

Instance Method Details

#executeObject

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/rcrewai/process.rb', line 14

def execute
  raise NotImplementedError, 'Subclasses must implement #execute method'
end