Module: Mindee::V1::Parsing::Common::ExecutionPriority

Defined in:
lib/mindee/v1/parsing/common/execution_priority.rb,
sig/mindee/v1/parsing/common/execution_priority.rbs

Overview

Execution policy priority values.

Constant Summary collapse

LOW =

Low priority execution.

:low
MEDIUM =

Medium priority execution.

:medium
HIGH =

High priority execution.

:high

Class Method Summary collapse

Class Method Details

.to_priority(priority_str) ⇒ Symbol?

Sets the priority to one of its possibly values, defaults to nil otherwise.



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/mindee/v1/parsing/common/execution_priority.rb', line 22

def self.to_priority(priority_str)
  return nil if priority_str.nil?

  case priority_str.downcase
  when 'low'
    :low
  when 'high'
    :high
  else
    :medium
  end
end