Class: RailsAiBridge::Config::Rubydex

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_ai_bridge/config/rubydex.rb

Overview

Holds rubydex semantic analysis configuration settings.

Rubydex is an optional dependency providing static semantic analysis of Ruby codebases via Shopify's rubydex toolkit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Rubydex

Returns a new instance of Rubydex.



28
29
30
31
32
33
34
35
# File 'lib/rails_ai_bridge/config/rubydex.rb', line 28

def initialize
  @rubydex_enabled = true
  @rubydex_index_path = 'tmp/rubydex_index'
  @semantic_introspector_enabled = false
  @semantic_context_depth = :standard
  @rubydex_incremental_threshold = 0.3
  @rubydex_persist_index = false
end

Instance Attribute Details

#rubydex_enabled ⇒ Boolean

Returns whether rubydex integration is enabled.

Returns:

  • (Boolean) —

    whether rubydex integration is enabled



11
12
13
# File 'lib/rails_ai_bridge/config/rubydex.rb', line 11

def rubydex_enabled
  @rubydex_enabled
end

#rubydex_incremental_threshold ⇒ Float

Returns ratio of changed files that triggers a full rebuild (0.0–1.0).

Returns:

  • (Float) —

    ratio of changed files that triggers a full rebuild (0.0–1.0)



23
24
25
# File 'lib/rails_ai_bridge/config/rubydex.rb', line 23

def rubydex_incremental_threshold
  @rubydex_incremental_threshold
end

#rubydex_index_path ⇒ String

Returns path to store the rubydex index (relative to Rails.root).

Returns:

  • (String) —

    path to store the rubydex index (relative to Rails.root)



14
15
16
# File 'lib/rails_ai_bridge/config/rubydex.rb', line 14

def rubydex_index_path
  @rubydex_index_path
end

#rubydex_persist_index ⇒ Boolean

Returns whether to persist file mtimes across process restarts.

Returns:

  • (Boolean) —

    whether to persist file mtimes across process restarts



26
27
28
# File 'lib/rails_ai_bridge/config/rubydex.rb', line 26

def rubydex_persist_index
  @rubydex_persist_index
end

#semantic_context_depth ⇒ Symbol

Returns depth of semantic context in generated files (:summary, :standard, :full).

Returns:

  • (Symbol) —

    depth of semantic context in generated files (:summary, :standard, :full)



20
21
22
# File 'lib/rails_ai_bridge/config/rubydex.rb', line 20

def semantic_context_depth
  @semantic_context_depth
end

#semantic_introspector_enabled ⇒ Boolean

Returns whether the semantic introspector is enabled.

Returns:

  • (Boolean) —

    whether the semantic introspector is enabled



17
18
19
# File 'lib/rails_ai_bridge/config/rubydex.rb', line 17

def semantic_introspector_enabled
  @semantic_introspector_enabled
end