Module: RulesEngine::Process
- Defined in:
- lib/rules_engine/process/runner.rb,
lib/rules_engine/process/auditor.rb,
lib/rules_engine/process/runner/db_runner.rb,
lib/rules_engine/process/auditor/db_auditor.rb
Defined Under Namespace
Classes: Auditor, DbAuditor, DbRunner, ReProcessAudit, ReProcessRun, Runner
Constant Summary
collapse
- PROCESS_STATUS_NONE =
0
- PROCESS_STATUS_RUNNING =
1
- PROCESS_STATUS_SUCCESS =
2
- PROCESS_STATUS_FAILURE =
3
- AUDIT_NONE =
0
- AUDIT_INFO =
1
- AUDIT_SUCCESS =
2
- AUDIT_FAILURE =
3
Class Method Summary
collapse
Class Method Details
.auditor ⇒ Object
28
29
30
|
# File 'lib/rules_engine/process/auditor.rb', line 28
def auditor
@auditor ||= Auditor.new
end
|
.auditor=(auditor_options) ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/rules_engine/process/auditor.rb', line 13
def auditor=(auditor_options)
type, *parameters = *([ auditor_options ].flatten)
case type
when Symbol
auditor_class_name = type.to_s.camelize
auditor_class = RulesEngine::Process.const_get(auditor_class_name)
@auditor = auditor_class.new(*parameters)
when nil
@auditor = Auditor.new
else
@auditor = auditor_options
end
end
|
.runner ⇒ Object
28
29
30
31
|
# File 'lib/rules_engine/process/runner.rb', line 28
def runner
throw "RulesEngine::Process::Runner required" unless @runner
@runner
end
|
.runner=(runner_options) ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/rules_engine/process/runner.rb', line 13
def runner=(runner_options)
type, *parameters = *([ runner_options ].flatten)
case type
when Symbol
runner_class_name = type.to_s.camelize
runner_class = RulesEngine::Process.const_get(runner_class_name)
@runner = runner_class.new(*parameters)
when nil
@runner = nil
else
@runner = runner_options
end
end
|