Class: Kolekti::Collector
- Inherits:
-
Object
- Object
- Kolekti::Collector
- Defined in:
- lib/kolekti/collector.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#supported_metrics ⇒ Object
readonly
Returns the value of attribute supported_metrics.
Class Method Summary collapse
Instance Method Summary collapse
- #clean(code_directory, wanted_metric_configurations) ⇒ Object
- #collect_metrics(code_directory, wanted_metric_configurations, persistence_strategy) ⇒ Object
- #default_value_from(metric_configuration) ⇒ Object
-
#initialize(name, description, supported_metrics) ⇒ Collector
constructor
A new instance of Collector.
Constructor Details
#initialize(name, description, supported_metrics) ⇒ Collector
Returns a new instance of Collector.
18 19 20 21 22 |
# File 'lib/kolekti/collector.rb', line 18 def initialize(name, description, supported_metrics) @name = name @description = description @supported_metrics = supported_metrics end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/kolekti/collector.rb', line 6 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/kolekti/collector.rb', line 6 def name @name end |
#supported_metrics ⇒ Object (readonly)
Returns the value of attribute supported_metrics.
6 7 8 |
# File 'lib/kolekti/collector.rb', line 6 def supported_metrics @supported_metrics end |
Class Method Details
.available? ⇒ Boolean
16 |
# File 'lib/kolekti/collector.rb', line 16 def self.available?; raise NotImplementedError; end |
.run_if_available(command) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/kolekti/collector.rb', line 8 def self.run_if_available(command) begin `#{command}` rescue SystemCallError nil end end |
Instance Method Details
#clean(code_directory, wanted_metric_configurations) ⇒ Object
26 |
# File 'lib/kolekti/collector.rb', line 26 def clean(code_directory, wanted_metric_configurations); raise NotImplementedError; end |
#collect_metrics(code_directory, wanted_metric_configurations, persistence_strategy) ⇒ Object
24 |
# File 'lib/kolekti/collector.rb', line 24 def collect_metrics(code_directory, wanted_metric_configurations, persistence_strategy); raise NotImplementedError; end |
#default_value_from(metric_configuration) ⇒ Object
28 |
# File 'lib/kolekti/collector.rb', line 28 def default_value_from(metric_configuration); raise NotImplementedError; end |