Class: Jobi::Message
Instance Attribute Summary collapse
-
#after_run ⇒ Object
readonly
Returns the value of attribute after_run.
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#job_class ⇒ Object
readonly
Returns the value of attribute job_class.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
Instance Method Summary collapse
-
#initialize(job_class:, args:, after_run: nil) ⇒ Message
constructor
A new instance of Message.
Methods included from Utils
#constantize, #generate_job_id
Constructor Details
#initialize(job_class:, args:, after_run: nil) ⇒ Message
Returns a new instance of Message.
9 10 11 12 13 14 15 |
# File 'lib/jobi/message.rb', line 9 def initialize(job_class:, args:, after_run: nil) @id = generate_job_id @job_class = job_class @args = args @started_at = Time.now.to_f @after_run = after_run end |
Instance Attribute Details
#after_run ⇒ Object (readonly)
Returns the value of attribute after_run.
7 8 9 |
# File 'lib/jobi/message.rb', line 7 def after_run @after_run end |
#args ⇒ Object (readonly)
Returns the value of attribute args.
7 8 9 |
# File 'lib/jobi/message.rb', line 7 def args @args end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/jobi/message.rb', line 7 def id @id end |
#job_class ⇒ Object (readonly)
Returns the value of attribute job_class.
7 8 9 |
# File 'lib/jobi/message.rb', line 7 def job_class @job_class end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at.
7 8 9 |
# File 'lib/jobi/message.rb', line 7 def started_at @started_at end |