Class: Rafflesia::JobEvent
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::JobEvent
- Defined in:
- lib/rafflesia/foundry/job_event.rb
Constant Summary collapse
- HASH_ATTRS =
{ attempt: :attempt, created_at: :created_at, details: :details, message: :message, sequence: :sequence, type: :type, worker_id: :worker_id }.freeze
Instance Attribute Summary collapse
-
#attempt ⇒ Object
Returns the value of attribute attempt.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#details ⇒ Object
Returns the value of attribute details.
-
#message ⇒ Object
Returns the value of attribute message.
-
#sequence ⇒ Object
Returns the value of attribute sequence.
-
#type ⇒ Object
Returns the value of attribute type.
-
#worker_id ⇒ Object
Returns the value of attribute worker_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ JobEvent
constructor
A new instance of JobEvent.
Constructor Details
#initialize(json) ⇒ JobEvent
Returns a new instance of JobEvent.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/foundry/job_event.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @attempt = hash[:attempt] @created_at = hash[:created_at] @details = hash[:details] || {} @message = hash[:message] @sequence = hash[:sequence] @type = hash[:type] @worker_id = hash[:worker_id] end |
Instance Attribute Details
#attempt ⇒ Object
Returns the value of attribute attempt.
18 19 20 |
# File 'lib/rafflesia/foundry/job_event.rb', line 18 def attempt @attempt end |
#created_at ⇒ Object
Returns the value of attribute created_at.
18 19 20 |
# File 'lib/rafflesia/foundry/job_event.rb', line 18 def created_at @created_at end |
#details ⇒ Object
Returns the value of attribute details.
18 19 20 |
# File 'lib/rafflesia/foundry/job_event.rb', line 18 def details @details end |
#message ⇒ Object
Returns the value of attribute message.
18 19 20 |
# File 'lib/rafflesia/foundry/job_event.rb', line 18 def @message end |
#sequence ⇒ Object
Returns the value of attribute sequence.
18 19 20 |
# File 'lib/rafflesia/foundry/job_event.rb', line 18 def sequence @sequence end |
#type ⇒ Object
Returns the value of attribute type.
18 19 20 |
# File 'lib/rafflesia/foundry/job_event.rb', line 18 def type @type end |
#worker_id ⇒ Object
Returns the value of attribute worker_id.
18 19 20 |
# File 'lib/rafflesia/foundry/job_event.rb', line 18 def worker_id @worker_id end |