Class: KalibroGem::Entities::Processing
- Inherits:
-
Model
- Object
- Model
- KalibroGem::Entities::Processing
show all
- Defined in:
- lib/kalibro_gem/entities/processing.rb
Instance Attribute Summary collapse
Attributes inherited from Model
#kalibro_errors
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Model
#==, create, create_array_from_hash, create_objects_array_from_hash, #destroy, #errors=, exists?, find, #initialize, request, #save, #save!, #to_hash, to_object, to_objects_array
#exists_action, #find_action, #id_params
#convert_to_hash, #date_with_milliseconds, #field_to_hash
#get_xml, #xml_instance_class_name
#destroy_action, #destroy_params, #save_action, #save_params
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
23
24
25
|
# File 'lib/kalibro_gem/entities/processing.rb', line 23
def date
@date
end
|
#error ⇒ Object
Returns the value of attribute error.
23
24
25
|
# File 'lib/kalibro_gem/entities/processing.rb', line 23
def error
@error
end
|
#id ⇒ Object
Returns the value of attribute id.
23
24
25
|
# File 'lib/kalibro_gem/entities/processing.rb', line 23
def id
@id
end
|
#process_time ⇒ Object
Returns the value of attribute process_time.
23
24
25
|
# File 'lib/kalibro_gem/entities/processing.rb', line 23
def process_time
@process_time
end
|
#results_root_id ⇒ Object
Returns the value of attribute results_root_id.
23
24
25
|
# File 'lib/kalibro_gem/entities/processing.rb', line 23
def results_root_id
@results_root_id
end
|
#state ⇒ Object
Returns the value of attribute state.
23
24
25
|
# File 'lib/kalibro_gem/entities/processing.rb', line 23
def state
@state
end
|
Class Method Details
.first_processing_after(repository_id, date) ⇒ Object
104
105
106
|
# File 'lib/kalibro_gem/entities/processing.rb', line 104
def self.first_processing_after(repository_id, date)
new request(:first_processing_after, {:repository_id => repository_id, :date => date})[:processing]
end
|
.first_processing_of(repository_id) ⇒ Object
96
97
98
|
# File 'lib/kalibro_gem/entities/processing.rb', line 96
def self.first_processing_of(repository_id)
new request(:first_processing, {:repository_id => repository_id})[:processing]
end
|
.has_processing(repository_id) ⇒ Object
72
73
74
|
# File 'lib/kalibro_gem/entities/processing.rb', line 72
def self.has_processing(repository_id)
request(:has_processing, {:repository_id => repository_id})[:exists]
end
|
.has_processing_after(repository_id, date) ⇒ Object
80
81
82
|
# File 'lib/kalibro_gem/entities/processing.rb', line 80
def self.has_processing_after(repository_id, date)
request(:has_processing_after, {:repository_id => repository_id, :date => date})[:exists]
end
|
.has_processing_before(repository_id, date) ⇒ Object
84
85
86
|
# File 'lib/kalibro_gem/entities/processing.rb', line 84
def self.has_processing_before(repository_id, date)
request(:has_processing_before, {:repository_id => repository_id, :date => date})[:exists]
end
|
.has_ready_processing(repository_id) ⇒ Object
76
77
78
|
# File 'lib/kalibro_gem/entities/processing.rb', line 76
def self.has_ready_processing(repository_id)
request(:has_ready_processing, {:repository_id => repository_id})[:exists]
end
|
.last_processing_before(repository_id, date) ⇒ Object
108
109
110
|
# File 'lib/kalibro_gem/entities/processing.rb', line 108
def self.last_processing_before(repository_id, date)
new request(:last_processing_before, {:repository_id => repository_id, :date => date})[:processing]
end
|
.last_processing_of(repository_id) ⇒ Object
100
101
102
|
# File 'lib/kalibro_gem/entities/processing.rb', line 100
def self.last_processing_of(repository_id)
new request(:last_processing, {:repository_id => repository_id})[:processing]
end
|
.last_processing_state_of(repository_id) ⇒ Object
88
89
90
|
# File 'lib/kalibro_gem/entities/processing.rb', line 88
def self.last_processing_state_of(repository_id)
request(:last_processing_state, {:repository_id => repository_id})[:process_state]
end
|
.last_ready_processing_of(repository_id) ⇒ Object
92
93
94
|
# File 'lib/kalibro_gem/entities/processing.rb', line 92
def self.last_ready_processing_of(repository_id)
new request(:last_ready_processing, {:repository_id => repository_id})[:processing]
end
|
.processing_of(repository_id) ⇒ Object
53
54
55
56
57
58
59
|
# File 'lib/kalibro_gem/entities/processing.rb', line 53
def self.processing_of(repository_id)
if has_ready_processing(repository_id)
last_ready_processing_of(repository_id)
else
last_processing_of(repository_id)
end
end
|
.processing_with_date_of(repository_id, date) ⇒ Object
61
62
63
64
65
66
67
68
69
70
|
# File 'lib/kalibro_gem/entities/processing.rb', line 61
def self.processing_with_date_of(repository_id, date)
date = date.is_a?(String) ? DateTime.parse(date) : date
if has_processing_after(repository_id, date)
first_processing_after(repository_id, date)
elsif has_processing_before(repository_id, date)
last_processing_before(repository_id, date)
else
nil
end
end
|
Instance Method Details
#process_times ⇒ Object
41
42
43
|
# File 'lib/kalibro_gem/entities/processing.rb', line 41
def process_times
@process_time
end
|
#process_times=(value) ⇒ Object
33
34
35
|
# File 'lib/kalibro_gem/entities/processing.rb', line 33
def process_times=(value)
@process_time = value
end
|