Class: MetricFu::MetricCane
- Inherits:
-
Metric
- Object
- Metric
- MetricFu::MetricCane
show all
- Defined in:
- lib/metric_fu/metrics/cane/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
30
31
32
|
# File 'lib/metric_fu/metrics/cane/metric.rb', line 30
def activate
super
end
|
#default_run_options ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/metric_fu/metrics/cane/metric.rb', line 7
def default_run_options
{
dirs_to_cane: MetricFu::Io::FileSystem.directory("code_dirs"),
abc_max: 15,
line_length: 80,
no_doc: "n",
no_readme: "n",
filetypes: ["rb"]
}
end
|
#enable ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/metric_fu/metrics/cane/metric.rb', line 22
def enable
if MetricFu.configuration.supports_ripper? && !MetricFu.configuration.ruby18?
super
else
MetricFu.logger.debug("Cane is only available in MRI. It requires ripper and 1.9 hash syntax support")
end
end
|
#has_graph? ⇒ Boolean
18
19
20
|
# File 'lib/metric_fu/metrics/cane/metric.rb', line 18
def has_graph?
true
end
|
#name ⇒ Object
3
4
5
|
# File 'lib/metric_fu/metrics/cane/metric.rb', line 3
def name
:cane
end
|