Class: RailsAiBridge::Serializers::Providers::Collaborators::RulesKeyConsiderationsBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_ai_bridge/serializers/providers/collaborators/rules_key_considerations_builder.rb

Overview

Builds the key development considerations section for compact rules output.

Defined Under Namespace

Classes: ConsiderationLines

Constant Summary collapse

SECTION_HEADER =

Heading used for the key development considerations section.

'## Key Development Considerations'
FORMAT_STRINGS =

Format strings for supported consideration rows.

{
  test_framework: '- **Test Framework:** `%s`',
  cache_store: '- **Cache Store:** `%s`'
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ RulesKeyConsiderationsBuilder

Returns a new instance of RulesKeyConsiderationsBuilder.

Parameters:

  • context (Hash)

    introspection context



19
20
21
# File 'lib/rails_ai_bridge/serializers/providers/collaborators/rules_key_considerations_builder.rb', line 19

def initialize(context)
  @context = context
end

Instance Method Details

#callArray<String>

Returns considerations section lines, or empty when unavailable.

Returns:

  • (Array<String>)

    considerations section lines, or empty when unavailable



24
25
26
27
28
# File 'lib/rails_ai_bridge/serializers/providers/collaborators/rules_key_considerations_builder.rb', line 24

def call
  return [] unless considerations?

  ConsiderationLines.new(context: @context, formats: FORMAT_STRINGS).to_a
end