Class: Noticed::Coder
- Inherits:
-
Object
- Object
- Noticed::Coder
- Defined in:
- lib/noticed/coder.rb
Class Method Summary collapse
Class Method Details
.dump(data) ⇒ Object
14 15 16 17 |
# File 'lib/noticed/coder.rb', line 14 def self.dump(data) return if data.nil? ActiveJob::Arguments.send(:serialize_argument, data).to_json end |
.load(data) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/noticed/coder.rb', line 3 def self.load(data) return if data.nil? # Text columns need JSON parsing if data.is_a?(String) data = JSON.parse(data) end ActiveJob::Arguments.send(:deserialize_argument, data) end |