Class: Executo::FeedbackProcessService
- Inherits:
-
Object
- Object
- Executo::FeedbackProcessService
- Includes:
- TaggedLogger
- Defined in:
- lib/executo/feedback_process_service.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
writeonly
Sets the attribute arguments.
-
#exitstatus ⇒ Object
readonly
Returns the value of attribute exitstatus.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(feedback, results) ⇒ FeedbackProcessService
constructor
A new instance of FeedbackProcessService.
Constructor Details
#initialize(feedback, results) ⇒ FeedbackProcessService
Returns a new instance of FeedbackProcessService.
10 11 12 13 14 15 16 17 |
# File 'lib/executo/feedback_process_service.rb', line 10 def initialize(feedback, results) @id = feedback['id'] @state = results['state'] @exitstatus = results['exitstatus'] @stdout = results['stdout'] || [] @stderr = results['stderr'] || [] @arguments = feedback['arguments'] || {} end |
Instance Attribute Details
#arguments=(value) ⇒ Object (writeonly)
Sets the attribute arguments
8 9 10 |
# File 'lib/executo/feedback_process_service.rb', line 8 def arguments=(value) @arguments = value end |
#exitstatus ⇒ Object (readonly)
Returns the value of attribute exitstatus.
7 8 9 |
# File 'lib/executo/feedback_process_service.rb', line 7 def exitstatus @exitstatus end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/executo/feedback_process_service.rb', line 7 def id @id end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
7 8 9 |
# File 'lib/executo/feedback_process_service.rb', line 7 def state @state end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
7 8 9 |
# File 'lib/executo/feedback_process_service.rb', line 7 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
7 8 9 |
# File 'lib/executo/feedback_process_service.rb', line 7 def stdout @stdout end |
Class Method Details
.arguments(*names) ⇒ Object
30 31 32 33 34 |
# File 'lib/executo/feedback_process_service.rb', line 30 def arguments(*names) names.each do |name| define_method(name) { instance_variable_get('@arguments')[name.to_s] } end end |
.process_feedback(feedback, results) ⇒ Object
36 37 38 |
# File 'lib/executo/feedback_process_service.rb', line 36 def process_feedback(feedback, results) new(feedback, results).call end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 |
# File 'lib/executo/feedback_process_service.rb', line 19 def call logger_add_tag(self.class.name) logger_add_tag(id) perform end |