Class: SimpleCov::Formatter::AIFormatter::Configuration
- Inherits:
-
Object
- Object
- SimpleCov::Formatter::AIFormatter::Configuration
- 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.
Constant Summary collapse
- DEFAULT_REPORT_PATH =
Default output path for the generated markdown report
T.let('coverage/ai_report.md', String)
- DEFAULT_MAX_FILE_SIZE_KB =
Default maximum size of the output file in kilobytes
T.let(50, Integer)
- DEFAULT_MAX_SNIPPET_LINES =
Default maximum number of lines for a single snippet
T.let(5, Integer)
- DEFAULT_OUTPUT_TO_CONSOLE =
Default flag for outputting to console
T.let(false, T::Boolean)
- DEFAULT_GRANULARITY =
Default granularity level of the report
T.let(:fine, Symbol)
- DEFAULT_INCLUDE_BYPASSES =
Default flag for including bypassed regions in the report
T.let(true, T::Boolean)
Instance Attribute Summary collapse
-
#granularity ⇒ Object
Returns the value of attribute granularity.
-
#include_bypasses ⇒ Object
Returns the value of attribute include_bypasses.
-
#max_file_size_kb ⇒ Object
Returns the value of attribute max_file_size_kb.
-
#max_snippet_lines ⇒ Object
Returns the value of attribute max_snippet_lines.
-
#output_to_console ⇒ Object
Returns the value of attribute output_to_console.
-
#report_path ⇒ Object
Returns the value of attribute report_path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
59 60 61 62 63 64 65 66 |
# File 'lib/simplecov-ai/configuration.rb', line 59 def initialize @report_path = T.let(DEFAULT_REPORT_PATH, String) @max_file_size_kb = T.let(DEFAULT_MAX_FILE_SIZE_KB, Integer) @max_snippet_lines = T.let(DEFAULT_MAX_SNIPPET_LINES, Integer) @output_to_console = T.let(DEFAULT_OUTPUT_TO_CONSOLE, T::Boolean) @granularity = T.let(DEFAULT_GRANULARITY, Symbol) @include_bypasses = T.let(DEFAULT_INCLUDE_BYPASSES, T::Boolean) end |
Instance Attribute Details
#granularity ⇒ Object
Returns the value of attribute granularity.
51 52 53 |
# File 'lib/simplecov-ai/configuration.rb', line 51 def granularity @granularity end |
#include_bypasses ⇒ Object
Returns the value of attribute include_bypasses.
56 57 58 |
# File 'lib/simplecov-ai/configuration.rb', line 56 def include_bypasses @include_bypasses end |
#max_file_size_kb ⇒ Object
Returns the value of attribute max_file_size_kb.
36 37 38 |
# File 'lib/simplecov-ai/configuration.rb', line 36 def max_file_size_kb @max_file_size_kb end |
#max_snippet_lines ⇒ Object
Returns the value of attribute max_snippet_lines.
41 42 43 |
# File 'lib/simplecov-ai/configuration.rb', line 41 def max_snippet_lines @max_snippet_lines end |
#output_to_console ⇒ Object
Returns the value of attribute output_to_console.
46 47 48 |
# File 'lib/simplecov-ai/configuration.rb', line 46 def output_to_console @output_to_console end |
#report_path ⇒ Object
Returns the value of attribute report_path.
30 31 32 |
# File 'lib/simplecov-ai/configuration.rb', line 30 def report_path @report_path end |