Class: ArchUnit::Metrics::Reporting::MetricsExportOptions
- Inherits:
-
Data
- Object
- Data
- ArchUnit::Metrics::Reporting::MetricsExportOptions
- Defined in:
- lib/archunit/metrics/reporting/metrics_export_options.rb
Overview
Immutable options for one metrics HTML report.
Instance Attribute Summary collapse
-
#custom_css ⇒ Object
readonly
Returns the value of attribute custom_css.
-
#include_timestamp ⇒ Object
readonly
Returns the value of attribute include_timestamp.
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(output_path: nil, title: 'ArchUnitRuby Metrics Report', include_timestamp: true, custom_css: nil) ⇒ MetricsExportOptions
constructor
A new instance of MetricsExportOptions.
Constructor Details
#initialize(output_path: nil, title: 'ArchUnitRuby Metrics Report', include_timestamp: true, custom_css: nil) ⇒ MetricsExportOptions
Returns a new instance of MetricsExportOptions.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/archunit/metrics/reporting/metrics_export_options.rb', line 18 def initialize( output_path: nil, title: 'ArchUnitRuby Metrics Report', include_timestamp: true, custom_css: nil ) output_path = optional_path(output_path) title = immutable_string(title, :title) unless [true, false].include?() raise ArgumentError, 'include_timestamp must be true or false' end custom_css = optional_string(custom_css, :custom_css) super end |
Instance Attribute Details
#custom_css ⇒ Object (readonly)
Returns the value of attribute custom_css
8 9 10 |
# File 'lib/archunit/metrics/reporting/metrics_export_options.rb', line 8 def custom_css @custom_css end |
#include_timestamp ⇒ Object (readonly)
Returns the value of attribute include_timestamp
8 9 10 |
# File 'lib/archunit/metrics/reporting/metrics_export_options.rb', line 8 def @include_timestamp end |
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path
8 9 10 |
# File 'lib/archunit/metrics/reporting/metrics_export_options.rb', line 8 def output_path @output_path end |
#title ⇒ Object (readonly)
Returns the value of attribute title
8 9 10 |
# File 'lib/archunit/metrics/reporting/metrics_export_options.rb', line 8 def title @title end |
Class Method Details
.resolve(value) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/archunit/metrics/reporting/metrics_export_options.rb', line 11 def self.resolve(value) return new if value.nil? return value if value.is_a?(self) raise ArgumentError, 'options must be a MetricsExportOptions value or nil' end |