Class: WorkflowRb::Db::EventPublication
- Inherits:
-
WorkflowRecord
- Object
- ActiveRecord::Base
- WorkflowRecord
- WorkflowRb::Db::EventPublication
- Defined in:
- lib/workflow_rb/db/entities.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.abstract_class? ⇒ Boolean
74 75 76 |
# File 'lib/workflow_rb/db/entities.rb', line 74 def self.abstract_class? false end |
Instance Method Details
#pack(pub) ⇒ Object
78 79 80 81 82 83 84 |
# File 'lib/workflow_rb/db/entities.rb', line 78 def pack(pub) self.workflow_id = pub.workflow_id self.step_id = pub.step_id self.event_name = pub.event_name self.event_key = pub.event_key self.event_data = YAML.dump(pub.event_data) end |
#unpack ⇒ Object
86 87 88 89 90 91 92 93 94 95 |
# File 'lib/workflow_rb/db/entities.rb', line 86 def unpack result = WorkflowRb::EventPublication.new result.id = self.id result.workflow_id = self.workflow_id result.step_id = self.step_id result.event_name = self.event_name result.event_key = self.event_key result.event_data = YAML.load(self.event_data) result end |