Class: JsonMarshal::Marshaller
- Inherits:
-
Object
- Object
- JsonMarshal::Marshaller
- Defined in:
- lib/json_marshal/marshaller.rb
Class Method Summary collapse
Class Method Details
.dump(obj) ⇒ Object
5 6 7 |
# File 'lib/json_marshal/marshaller.rb', line 5 def self.dump(obj) obj.to_json end |
.load(attribute) ⇒ Object
9 10 11 |
# File 'lib/json_marshal/marshaller.rb', line 9 def self.load(attribute) JSON.parse(attribute) if attribute.present? end |