Class: Aidp::Database::Repository

Inherits:
Object
  • Object
show all
Defined in:
lib/aidp/database/repository.rb

Overview

Base repository class for database access Provides common patterns for CRUD operations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table_name:, project_dir: Dir.pwd) ⇒ Repository

Returns a new instance of Repository.

Parameters:

  • table_name (String)

    Database table name

  • project_dir (String) (defaults to: Dir.pwd)

    Project directory path



14
15
16
17
# File 'lib/aidp/database/repository.rb', line 14

def initialize(table_name:, project_dir: Dir.pwd)
  @project_dir = project_dir
  @table_name = table_name
end

Instance Attribute Details

#project_dirObject (readonly)

Returns the value of attribute project_dir.



10
11
12
# File 'lib/aidp/database/repository.rb', line 10

def project_dir
  @project_dir
end

#table_nameObject (readonly)

Returns the value of attribute table_name.



10
11
12
# File 'lib/aidp/database/repository.rb', line 10

def table_name
  @table_name
end