Class: KalibroClient::Entities::Processor::ModuleResult
- Inherits:
-
Base
- Object
- Likeno::Entity
- Base
- Base
- KalibroClient::Entities::Processor::ModuleResult
show all
- Defined in:
- lib/kalibro_client/entities/processor/module_result.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
address
Methods inherited from Base
#kalibro_errors, module_name
Instance Attribute Details
#grade ⇒ Object
Returns the value of attribute grade.
22
23
24
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 22
def grade
@grade
end
|
#height ⇒ Object
Returns the value of attribute height.
22
23
24
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 22
def height
@height
end
|
#id ⇒ Object
Returns the value of attribute id.
22
23
24
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 22
def id
@id
end
|
#kalibro_module ⇒ Object
Returns the value of attribute kalibro_module.
22
23
24
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 22
def kalibro_module
@kalibro_module
end
|
#parent_id ⇒ Object
Returns the value of attribute parent_id.
22
23
24
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 22
def parent_id
@parent_id
end
|
#processing_id ⇒ Object
Returns the value of attribute processing_id.
22
23
24
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 22
def processing_id
@processing_id
end
|
Class Method Details
.history_of(module_result, repository_id) ⇒ Object
74
75
76
77
78
79
80
81
82
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 74
def self.history_of(module_result, repository_id)
response = self.create_array_from_hash(Repository.request(':id/module_result_history_of', {id: repository_id, kalibro_module_id: module_result.kalibro_module.id})['date_module_results'])
response.map do |date_module_result_pair|
date_module_result = KalibroClient::Entities::Miscellaneous::DateModuleResult.new
date_module_result.date = date_module_result_pair.first
date_module_result.module_result = KalibroClient::Entities::Processor::ModuleResult.new date_module_result_pair.last
date_module_result
end
end
|
Instance Method Details
#children ⇒ Object
24
25
26
27
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 24
def children
response = self.class.request(':id/children', {id: id}, :get)
self.class.create_objects_array_from_hash(response)
end
|
#file? ⇒ Boolean
70
71
72
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 70
def file?
!self.folder?
end
|
#folder? ⇒ Boolean
66
67
68
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 66
def folder?
self.children.count > 0
end
|
#hotspot_metric_results ⇒ Object
88
89
90
91
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 88
def hotspot_metric_results
HotspotMetricResult.create_objects_array_from_hash(self.class.request(":id/hotspot_metric_results",
{id: self.id}, :get))
end
|
#parents ⇒ Object
29
30
31
32
33
34
35
36
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 29
def parents
if parent_id == 0
[]
else
parent = self.class.find(parent_id)
parent.parents << parent
end
end
|
#processing ⇒ Object
54
55
56
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 54
def processing
KalibroClient::Entities::Processor::Processing.find(self.processing_id)
end
|
#tree_metric_results ⇒ Object
84
85
86
|
# File 'lib/kalibro_client/entities/processor/module_result.rb', line 84
def tree_metric_results
TreeMetricResult.create_objects_array_from_hash(self.class.request(":id/metric_results", {id: self.id}, :get))
end
|