Class: SimpleCov::Formatter::AIFormatter::Configuration

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/simplecov-ai/configuration.rb

Overview

Encapsulates all global tuning parameters that dictate the execution size, structure, and output verbosity of the AST-driven Markdown report generator. Exposes strongly-typed attributes through Sorbet to preempt runtime invalidities.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



46
47
48
49
50
51
52
53
# File 'lib/simplecov-ai/configuration.rb', line 46

def initialize
  @report_path = T.let('coverage/ai_report.md', String)
  @max_file_size_kb = T.let(50, Integer)
  @max_snippet_lines = T.let(5, Integer)
  @output_to_console = T.let(false, T::Boolean)
  @granularity = T.let(:fine, Symbol)
  @include_bypasses = T.let(true, T::Boolean)
end

Instance Attribute Details

#granularityObject

Returns the value of attribute granularity.



38
39
40
# File 'lib/simplecov-ai/configuration.rb', line 38

def granularity
  @granularity
end

#include_bypassesObject

Returns the value of attribute include_bypasses.



43
44
45
# File 'lib/simplecov-ai/configuration.rb', line 43

def include_bypasses
  @include_bypasses
end

#max_file_size_kbObject

Returns the value of attribute max_file_size_kb.



23
24
25
# File 'lib/simplecov-ai/configuration.rb', line 23

def max_file_size_kb
  @max_file_size_kb
end

#max_snippet_linesObject

Returns the value of attribute max_snippet_lines.



28
29
30
# File 'lib/simplecov-ai/configuration.rb', line 28

def max_snippet_lines
  @max_snippet_lines
end

#output_to_consoleObject

Returns the value of attribute output_to_console.



33
34
35
# File 'lib/simplecov-ai/configuration.rb', line 33

def output_to_console
  @output_to_console
end

#report_pathObject

Returns the value of attribute report_path.



17
18
19
# File 'lib/simplecov-ai/configuration.rb', line 17

def report_path
  @report_path
end