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



157
158
159
# File 'lib/brute/system_prompt.rb', line 157

def sections
  @sections
end

Instance Method Details

#each(&block) ⇒ Object



162
163
164
# File 'lib/brute/system_prompt.rb', line 162

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

#empty?Boolean

Returns:

  • (Boolean)


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

def empty?
  sections.empty?
end

#to_sObject



158
159
160
# File 'lib/brute/system_prompt.rb', line 158

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