Class: Arcp::Job::Subscribed
- Inherits:
-
Data
- Object
- Data
- Arcp::Job::Subscribed
- Defined in:
- lib/arcp/job/subscribed.rb
Instance Attribute Summary collapse
-
#job_id ⇒ Object
readonly
Returns the value of attribute job_id.
-
#subscribed_from ⇒ Object
readonly
Returns the value of attribute subscribed_from.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#job_id ⇒ Object (readonly)
Returns the value of attribute job_id
5 6 7 |
# File 'lib/arcp/job/subscribed.rb', line 5 def job_id @job_id end |
#subscribed_from ⇒ Object (readonly)
Returns the value of attribute subscribed_from
5 6 7 |
# File 'lib/arcp/job/subscribed.rb', line 5 def subscribed_from @subscribed_from end |
Class Method Details
.from_h(h) ⇒ Object
6 7 8 9 |
# File 'lib/arcp/job/subscribed.rb', line 6 def self.from_h(h) h = h.transform_keys(&:to_s) new(job_id: h.fetch('job_id'), subscribed_from: h.fetch('subscribed_from')) end |
Instance Method Details
#to_h ⇒ Object
11 |
# File 'lib/arcp/job/subscribed.rb', line 11 def to_h = { 'job_id' => job_id, 'subscribed_from' => subscribed_from } |