Class: RailsAiBridge::Tools::GetView::BaseFormatter

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

Overview

Base class for GetView formatters, providing common context and filtering logic.

Instance Method Summary collapse

Constructor Details

#initialize(context:, controller: nil, partial: nil) ⇒ BaseFormatter

Returns a new instance of BaseFormatter.

Parameters:

  • context (Hash)

    The context hash provided by the tool.

  • controller (String, nil) (defaults to: nil)

    The controller filter used.

  • partial (String, nil) (defaults to: nil)

    The partial filter used.



11
12
13
14
15
# File 'lib/rails_ai_bridge/tools/get_view/base_formatter.rb', line 11

def initialize(context:, controller: nil, partial: nil)
  @context = context
  @controller = controller
  @partial = partial
end