Class: RailsAiBridge::Tools::GetView::FullFormatter

Inherits:
BaseFormatter
  • Object
show all
Defined in:
lib/rails_ai_bridge/tools/get_view/full_formatter.rb

Overview

Formats full view details including templates, partials, helpers, and components.

Instance Method Summary collapse

Methods inherited from BaseFormatter

#initialize

Constructor Details

This class inherits a constructor from RailsAiBridge::Tools::GetView::BaseFormatter

Instance Method Details

#call ⇒ String

Returns The formatted full output.

Returns:

  • (String) —

    The formatted full output.



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rails_ai_bridge/tools/get_view/full_formatter.rb', line 9

def call
  @filtered = filter_view_data
  return "View introspection failed: #{@filtered[:error]}" if @filtered[:error]

  lines = [StandardFormatter.new(context: @context, controller: @controller, partial: @partial).call]
  lines.concat(helper_lines)
  lines.concat(component_lines)
  footer = tags.footer(fact_provenances)
  lines << '' << footer if footer
  lines.join("\n")
end