Class: KalibroClient::Entities::Processor::HotspotMetricResult

Inherits:
MetricResult
  • Object
show all
Defined in:
lib/kalibro_client/entities/processor/hotspot_metric_result.rb

Instance Attribute Summary collapse

Attributes inherited from MetricResult

#id, #metric_configuration, #metric_configuration_id, #module_result_id, #related_hotspot_metric_results_id, #value

Instance Method Summary collapse

Methods inherited from MetricResult

#module_result

Methods inherited from Base

address

Methods inherited from Base

#kalibro_errors, module_name

Constructor Details

#initialize(attributes = {}, persisted = false) ⇒ HotspotMetricResult

Returns a new instance of HotspotMetricResult.



24
25
26
27
28
29
30
31
32
# File 'lib/kalibro_client/entities/processor/hotspot_metric_result.rb', line 24

def initialize(attributes={}, persisted=false)
  @line_number = attributes["line_number"].to_i
  attributes.each do |field, value|
    if field != "line_number" and self.class.valid?(field)
      send("#{field}=", value)
    end
  end
  @persisted = persisted
end

Instance Attribute Details

#line_numberObject

Returns the value of attribute line_number.



22
23
24
# File 'lib/kalibro_client/entities/processor/hotspot_metric_result.rb', line 22

def line_number
  @line_number
end

#messageObject

Returns the value of attribute message.



22
23
24
# File 'lib/kalibro_client/entities/processor/hotspot_metric_result.rb', line 22

def message
  @message
end

Instance Method Details



34
35
36
37
# File 'lib/kalibro_client/entities/processor/hotspot_metric_result.rb', line 34

def related_results
  HotspotMetricResult.create_objects_array_from_hash(self.class.request(":id/related_results",
                                                                        {id: self.id}, :get))
end