Class: JobWorkflow::Schedule
- Inherits:
-
Object
- Object
- JobWorkflow::Schedule
- Defined in:
- lib/job_workflow/schedule.rb,
sig/generated/job_workflow/schedule.rbs
Instance Attribute Summary collapse
- #args ⇒ Hash[Symbol, untyped] readonly
- #class_name ⇒ String readonly
- #description ⇒ String? readonly
- #expression ⇒ String readonly
- #key ⇒ Symbol readonly
- #priority ⇒ Integer? readonly
- #queue ⇒ String? readonly
Instance Method Summary collapse
-
#initialize(expression:, class_name:, key: nil, queue: nil, priority: nil, args: {}, description: nil) ⇒ Schedule
constructor
rubocop:disable Metrics/ParameterLists : ( expression: String, class_name: String, ?key: (String | Symbol)?, ?queue: String?, ?priority: Integer?, ?args: Hash[Symbol, untyped], ?description: String? ) -> void.
-
#to_config ⇒ Hash[Symbol, untyped]
: () -> Hash[Symbol, untyped].
Constructor Details
#initialize(expression:, class_name:, key: nil, queue: nil, priority: nil, args: {}, description: nil) ⇒ Schedule
rubocop:disable Metrics/ParameterLists : ( expression: String, class_name: String, ?key: (String | Symbol)?, ?queue: String?, ?priority: Integer?, ?args: Hash[Symbol, untyped], ?description: String? ) -> void
23 24 25 26 27 28 29 30 31 |
# File 'lib/job_workflow/schedule.rb', line 23 def initialize(expression:, class_name:, key: nil, queue: nil, priority: nil, args: {}, description: nil) @expression = expression #: String @class_name = class_name #: String @key = (key || class_name).to_sym #: Symbol @queue = queue #: String? @priority = priority #: Integer? @args = args #: Hash[Symbol, untyped] @description = description #: String? end |
Instance Attribute Details
#args ⇒ Hash[Symbol, untyped] (readonly)
10 11 12 |
# File 'lib/job_workflow/schedule.rb', line 10 def args @args end |
#class_name ⇒ String (readonly)
6 7 8 |
# File 'lib/job_workflow/schedule.rb', line 6 def class_name @class_name end |
#description ⇒ String? (readonly)
11 12 13 |
# File 'lib/job_workflow/schedule.rb', line 11 def description @description end |
#expression ⇒ String (readonly)
7 8 9 |
# File 'lib/job_workflow/schedule.rb', line 7 def expression @expression end |
#key ⇒ Symbol (readonly)
5 6 7 |
# File 'lib/job_workflow/schedule.rb', line 5 def key @key end |
#priority ⇒ Integer? (readonly)
9 10 11 |
# File 'lib/job_workflow/schedule.rb', line 9 def priority @priority end |
#queue ⇒ String? (readonly)
8 9 10 |
# File 'lib/job_workflow/schedule.rb', line 8 def queue @queue end |
Instance Method Details
#to_config ⇒ Hash[Symbol, untyped]
: () -> Hash[Symbol, untyped]
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/job_workflow/schedule.rb', line 35 def to_config { class: class_name, schedule: expression, queue: queue, priority: priority, args: args.empty? ? nil : [args], description: description }.compact end |