Class: Brute::SystemPrompt::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/brute/system_prompt.rb

Overview

Immutable result of a prepared system prompt.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#sectionsObject

Returns the value of attribute sections

Returns:

  • (Object)

    the current value of sections



167
168
169
# File 'lib/brute/system_prompt.rb', line 167

def sections
  @sections
end

Instance Method Details

#each(&block) ⇒ Object



172
173
174
# File 'lib/brute/system_prompt.rb', line 172

def each(&block)
  sections.each(&block)
end

#empty?Boolean

Returns:

  • (Boolean)


176
177
178
# File 'lib/brute/system_prompt.rb', line 176

def empty?
  sections.empty?
end

#to_sObject



168
169
170
# File 'lib/brute/system_prompt.rb', line 168

def to_s
  sections.join("\n\n")
end