Class: KalibroClient::Entities::Processor::MetricResult

Inherits:
Base
  • Object
show all
Defined in:
lib/kalibro_client/entities/processor/metric_result.rb

Direct Known Subclasses

HotspotMetricResult, TreeMetricResult

Instance Attribute Summary collapse

Attributes included from DateAttributes

#created_at, #updated_at

Attributes inherited from Base

#kalibro_errors, #persisted

Instance Method Summary collapse

Methods inherited from Base

address

Methods inherited from Base

#==, create, create_array_from_hash, create_objects_array_from_hash, #destroy, exists?, find, #initialize, request, #save, #save!, #to_hash, to_object, to_objects_array, #update

Methods included from RequestMethods::ClassMethods

#exists_action, #find_action, #id_params

Methods included from HashConverters

#convert_to_hash, #date_with_milliseconds, #field_to_hash

Methods included from XMLConverters

#get_xml, #xml_instance_class_name

Methods included from RequestMethods

#destroy_action, #destroy_params, #destroy_prefix, #save_action, #save_params, #save_prefix, #update_params, #update_prefix

Constructor Details

This class inherits a constructor from KalibroClient::Entities::Base

Instance Attribute Details

#idObject

TODO: related_hotspot_metric_results_id should be enclosed to Processor which does not return this id into the response

there should be a controller that returns all the HotspotMetricResults associated through RelatedHotspotMetricResult


23
24
25
# File 'lib/kalibro_client/entities/processor/metric_result.rb', line 23

def id
  @id
end

#line_numberObject

TODO: related_hotspot_metric_results_id should be enclosed to Processor which does not return this id into the response

there should be a controller that returns all the HotspotMetricResults associated through RelatedHotspotMetricResult


23
24
25
# File 'lib/kalibro_client/entities/processor/metric_result.rb', line 23

def line_number
  @line_number
end

#messageObject

TODO: related_hotspot_metric_results_id should be enclosed to Processor which does not return this id into the response

there should be a controller that returns all the HotspotMetricResults associated through RelatedHotspotMetricResult


23
24
25
# File 'lib/kalibro_client/entities/processor/metric_result.rb', line 23

def message
  @message
end

#metric_configurationObject

Returns the value of attribute metric_configuration.



25
26
27
# File 'lib/kalibro_client/entities/processor/metric_result.rb', line 25

def metric_configuration
  @metric_configuration
end

#metric_configuration_idObject

TODO: related_hotspot_metric_results_id should be enclosed to Processor which does not return this id into the response

there should be a controller that returns all the HotspotMetricResults associated through RelatedHotspotMetricResult


23
24
25
# File 'lib/kalibro_client/entities/processor/metric_result.rb', line 23

def metric_configuration_id
  @metric_configuration_id
end

#module_result_idObject

TODO: related_hotspot_metric_results_id should be enclosed to Processor which does not return this id into the response

there should be a controller that returns all the HotspotMetricResults associated through RelatedHotspotMetricResult


23
24
25
# File 'lib/kalibro_client/entities/processor/metric_result.rb', line 23

def module_result_id
  @module_result_id
end

TODO: related_hotspot_metric_results_id should be enclosed to Processor which does not return this id into the response

there should be a controller that returns all the HotspotMetricResults associated through RelatedHotspotMetricResult


23
24
25
# File 'lib/kalibro_client/entities/processor/metric_result.rb', line 23

def related_hotspot_metric_results_id
  @related_hotspot_metric_results_id
end

#valueObject

TODO: related_hotspot_metric_results_id should be enclosed to Processor which does not return this id into the response

there should be a controller that returns all the HotspotMetricResults associated through RelatedHotspotMetricResult


23
24
25
# File 'lib/kalibro_client/entities/processor/metric_result.rb', line 23

def value
  @value
end

Instance Method Details

#module_resultObject



53
54
55
56
57
58
# File 'lib/kalibro_client/entities/processor/metric_result.rb', line 53

def module_result
  return @module_result unless @module_result.nil? || @module_result_id != @module_result.id
  module_result_hash = KalibroClient::Entities::Processor::MetricResult
                       .request(':id/module_result', { id: self.id }, :get)['module_result']
  @module_result = KalibroClient::Entities::Processor::ModuleResult.new module_result_hash
end