Class: SimpleCovMcp::AppConfig
- Inherits:
-
Struct
- Object
- Struct
- SimpleCovMcp::AppConfig
- Defined in:
- lib/simplecov_mcp/app_config.rb
Overview
Configuration container for application options (used by both CLI and MCP modes) Uses Struct for simplicity and built-in functionality
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#error_mode ⇒ Object
Returns the value of attribute error_mode.
-
#format ⇒ Object
Returns the value of attribute format.
-
#log_file ⇒ Object
Returns the value of attribute log_file.
-
#resultset ⇒ Object
Returns the value of attribute resultset.
-
#root ⇒ Object
Returns the value of attribute root.
-
#show_version ⇒ Object
Returns the value of attribute show_version.
-
#sort_order ⇒ Object
Returns the value of attribute sort_order.
-
#source_context ⇒ Object
Returns the value of attribute source_context.
-
#source_mode ⇒ Object
Returns the value of attribute source_mode.
-
#staleness ⇒ Object
Returns the value of attribute staleness.
-
#tracked_globs ⇒ Object
Returns the value of attribute tracked_globs.
Instance Method Summary collapse
-
#formatter_options ⇒ Object
Convenience method for SourceFormatter initialization.
-
#initialize(root: '.', resultset: nil, format: :table, sort_order: :descending, source_mode: nil, source_context: 2, color: $stdout.tty?, error_mode: :log, staleness: :off, tracked_globs: nil, log_file: nil, show_version: false) ⇒ AppConfig
constructor
Set sensible defaults - ALL SYMBOLS FOR ENUMS.
-
#model_options ⇒ Object
Convenience method for CoverageModel initialization.
Constructor Details
#initialize(root: '.', resultset: nil, format: :table, sort_order: :descending, source_mode: nil, source_context: 2, color: $stdout.tty?, error_mode: :log, staleness: :off, tracked_globs: nil, log_file: nil, show_version: false) ⇒ AppConfig
Set sensible defaults - ALL SYMBOLS FOR ENUMS
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/simplecov_mcp/app_config.rb', line 22 def initialize( root: '.', resultset: nil, format: :table, sort_order: :descending, source_mode: nil, source_context: 2, color: $stdout.tty?, error_mode: :log, staleness: :off, tracked_globs: nil, log_file: nil, show_version: false ) super end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def color @color end |
#error_mode ⇒ Object
Returns the value of attribute error_mode
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def error_mode @error_mode end |
#format ⇒ Object
Returns the value of attribute format
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def format @format end |
#log_file ⇒ Object
Returns the value of attribute log_file
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def log_file @log_file end |
#resultset ⇒ Object
Returns the value of attribute resultset
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def resultset @resultset end |
#root ⇒ Object
Returns the value of attribute root
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def root @root end |
#show_version ⇒ Object
Returns the value of attribute show_version
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def show_version @show_version end |
#sort_order ⇒ Object
Returns the value of attribute sort_order
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def sort_order @sort_order end |
#source_context ⇒ Object
Returns the value of attribute source_context
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def source_context @source_context end |
#source_mode ⇒ Object
Returns the value of attribute source_mode
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def source_mode @source_mode end |
#staleness ⇒ Object
Returns the value of attribute staleness
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def staleness @staleness end |
#tracked_globs ⇒ Object
Returns the value of attribute tracked_globs
6 7 8 |
# File 'lib/simplecov_mcp/app_config.rb', line 6 def tracked_globs @tracked_globs end |
Instance Method Details
#formatter_options ⇒ Object
Convenience method for SourceFormatter initialization
50 51 52 53 54 |
# File 'lib/simplecov_mcp/app_config.rb', line 50 def { color_enabled: color } end |
#model_options ⇒ Object
Convenience method for CoverageModel initialization
40 41 42 43 44 45 46 47 |
# File 'lib/simplecov_mcp/app_config.rb', line 40 def { root: root, resultset: resultset, staleness: staleness, tracked_globs: tracked_globs } end |