Class: MetricFu::MetricFlog
- Inherits:
-
Metric
- Object
- Metric
- MetricFu::MetricFlog
show all
- Defined in:
- lib/metric_fu/metrics/flog/metric.rb
Instance Attribute Summary
Attributes inherited from Metric
#activated, #enabled
Instance Method Summary
collapse
Methods inherited from Metric
#configured_run_options, #default_run_args, enabled_metrics, #gem_name, get_metric, #initialize, metrics, #run, #run_external, #run_options
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class MetricFu::Metric
Instance Method Details
#activate ⇒ Object
23
24
25
26
27
|
# File 'lib/metric_fu/metrics/flog/metric.rb', line 23
def activate
activate_library "flog"
activate_library "flog_cli"
super
end
|
#default_run_options ⇒ Object
7
8
9
|
# File 'lib/metric_fu/metrics/flog/metric.rb', line 7
def default_run_options
{ dirs_to_flog: MetricFu::Io::FileSystem.directory("code_dirs"), continue: true, all: true, quiet: true }
end
|
#enable ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/metric_fu/metrics/flog/metric.rb', line 15
def enable
if MetricFu.configuration.mri?
super
else
MetricFu.logger.debug("Flog is only available in MRI due to flog tasks")
end
end
|
#has_graph? ⇒ Boolean
11
12
13
|
# File 'lib/metric_fu/metrics/flog/metric.rb', line 11
def has_graph?
true
end
|
#name ⇒ Object
3
4
5
|
# File 'lib/metric_fu/metrics/flog/metric.rb', line 3
def name
:flog
end
|