Class: HubSsoLib::Serialiser
- Inherits:
-
Object
- Object
- HubSsoLib::Serialiser
- Defined in:
- lib/hub_sso_lib.rb
Overview
Simple object serialiser and deserialiser using Marshal and Base64.
Class Method Summary collapse
Class Method Details
.deserialise_object(data) ⇒ Object
75 76 77 |
# File 'lib/hub_sso_lib.rb', line 75 def self.deserialise_object(data) Marshal.load(Base64.strict_decode64(data)) rescue nil end |
.serialise_object(object) ⇒ Object
71 72 73 |
# File 'lib/hub_sso_lib.rb', line 71 def self.serialise_object(object) Base64.strict_encode64(Marshal.dump(object)) end |