Class: MotherBrain::JobTicket
- Inherits:
- BasicObject
- Defined in:
- lib/mb/job_ticket.rb
Overview
A proxy object around a JobRecord stored in the JobManager. This wrapper object can be returned as a response of the public API to a consumer. A ticket will poll it’s referenced JobRecord in the JobManager for an update about a running or completed Job
Instance Attribute Summary collapse
- #id ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(id) ⇒ JobTicket
constructor
A new instance of JobTicket.
Constructor Details
#initialize(id) ⇒ JobTicket
Returns a new instance of JobTicket.
11 12 13 |
# File 'lib/mb/job_ticket.rb', line 11 def initialize(id) @id = id end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object (private)
21 22 23 |
# File 'lib/mb/job_ticket.rb', line 21 def method_missing(method, *args, &block) record.send(method, *args, &block) end |
Instance Attribute Details
#id ⇒ Object (readonly)
8 9 10 |
# File 'lib/mb/job_ticket.rb', line 8 def id @id end |