Class: KalibroClient::Entities::Miscellaneous::HotspotMetric

Inherits:
NativeMetric show all
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

Methods inherited from Base

#==, #to_hash

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