Class: Arcp::Job::Subscribe
- Inherits:
-
Data
- Object
- Data
- Arcp::Job::Subscribe
- Defined in:
- lib/arcp/job/subscribe.rb
Instance Attribute Summary collapse
-
#from_event_seq ⇒ Object
readonly
Returns the value of attribute from_event_seq.
-
#history ⇒ Object
readonly
Returns the value of attribute history.
-
#job_id ⇒ Object
readonly
Returns the value of attribute job_id.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#from_event_seq ⇒ Object (readonly)
Returns the value of attribute from_event_seq
5 6 7 |
# File 'lib/arcp/job/subscribe.rb', line 5 def from_event_seq @from_event_seq end |
#history ⇒ Object (readonly)
Returns the value of attribute history
5 6 7 |
# File 'lib/arcp/job/subscribe.rb', line 5 def history @history end |
#job_id ⇒ Object (readonly)
Returns the value of attribute job_id
5 6 7 |
# File 'lib/arcp/job/subscribe.rb', line 5 def job_id @job_id end |
Class Method Details
.from_h(h) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/arcp/job/subscribe.rb', line 6 def self.from_h(h) h = h.transform_keys(&:to_s) new( job_id: h.fetch('job_id'), from_event_seq: h['from_event_seq'], history: h.fetch('history', false) ) end |
Instance Method Details
#to_h ⇒ Object
15 16 17 18 19 |
# File 'lib/arcp/job/subscribe.rb', line 15 def to_h out = { 'job_id' => job_id, 'history' => history } out['from_event_seq'] = from_event_seq if from_event_seq out end |