Class: RailsWorkflow::OperationDecorator
Instance Method Summary
collapse
#assigned_to, #completed_at, #created_at
Methods inherited from Decorator
collection_decorator_class
Instance Method Details
#async ⇒ Object
15
16
17
|
# File 'app/decorators/rails_workflow/operation_decorator.rb', line 15
def async
object.async ? 'Yes' : 'No'
end
|
#child_process ⇒ Object
23
24
25
26
27
|
# File 'app/decorators/rails_workflow/operation_decorator.rb', line 23
def child_process
if object.child_process
::RailsWorkflow::ProcessDecorator.decorate(object.child_process)
end
end
|
#context ⇒ Object
7
8
9
|
# File 'app/decorators/rails_workflow/operation_decorator.rb', line 7
def context
ContextDecorator.decorate object.context
end
|
#is_background ⇒ Object
19
20
21
|
# File 'app/decorators/rails_workflow/operation_decorator.rb', line 19
def is_background
object.is_background ? 'Yes' : 'No'
end
|
#process ⇒ Object
11
12
13
|
# File 'app/decorators/rails_workflow/operation_decorator.rb', line 11
def process
object.process.decorate
end
|
#show_dependencies ⇒ Object
29
30
31
32
33
34
35
36
37
|
# File 'app/decorators/rails_workflow/operation_decorator.rb', line 29
def show_dependencies
if object.dependencies.present?
object.dependencies.map do |dependency|
Operation.find(dependency['operation_id']).decorate
end
else
[]
end
end
|
#show_template_dependencies ⇒ Object
39
40
41
|
# File 'app/decorators/rails_workflow/operation_decorator.rb', line 39
def show_template_dependencies
template.show_dependencies
end
|