Class: KalibroClient::Entities::Miscellaneous::HotspotMetric
- Inherits:
-
NativeMetric
- Object
- Base
- Metric
- NativeMetric
- KalibroClient::Entities::Miscellaneous::HotspotMetric
- Defined in:
- lib/kalibro_client/entities/miscellaneous/hotspot_metric.rb
Instance Attribute Summary
Attributes inherited from NativeMetric
#languages, #metric_collector_name
Attributes inherited from Metric
#code, #description, #name, #scope, #type
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, code, languages, metric_collector_name) ⇒ HotspotMetric
constructor
A new instance of HotspotMetric.
Methods inherited from Base
Methods included from HashConverters
#convert_to_hash, #date_with_milliseconds, #field_to_hash
Methods included from XMLConverters
#get_xml, #xml_instance_class_name
Constructor Details
#initialize(name, code, languages, metric_collector_name) ⇒ HotspotMetric
Returns a new instance of HotspotMetric.
5 6 7 |
# File 'lib/kalibro_client/entities/miscellaneous/hotspot_metric.rb', line 5 def initialize(name, code, languages, metric_collector_name) super(name, code, KalibroClient::Entities::Miscellaneous::Granularity.new(:SOFTWARE), languages, metric_collector_name, 'HotspotMetricSnapshot') end |
Class Method Details
.to_object(value) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/kalibro_client/entities/miscellaneous/hotspot_metric.rb', line 9 def self.to_object(value) if value.is_a?(Hash) new(value['name'], value['code'], value['languages'], value['metric_collector_name']) else value end end |