Class: RailsAiBridge::Serializers::Providers::Collaborators::StackOverviewBuilder::AuthPartsExtractor::AuthPayload

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

Overview

Normalizes nested auth provider payloads before probing them.

Instance Method Summary collapse

Constructor Details

#initialize(auth) ⇒ AuthPayload

Returns a new instance of AuthPayload.

Parameters:

  • auth (Hash)

    Auth configuration hash



100
101
102
# File 'lib/rails_ai_bridge/serializers/providers/collaborators/stack_overview_builder.rb', line 100

def initialize(auth)
  @auth = auth
end

Instance Method Details

#provider_present?(section_name, provider_key) ⇒ Boolean

Returns true when the provider payload is populated.

Parameters:

  • section_name (Symbol)

    auth payload section name

  • provider_key (Symbol)

    provider key inside the section

Returns:

  • (Boolean)

    true when the provider payload is populated



107
108
109
# File 'lib/rails_ai_bridge/serializers/providers/collaborators/stack_overview_builder.rb', line 107

def provider_present?(section_name, provider_key)
  section(section_name)[provider_key].present?
end