Sha256: 95dfd2201e5353d9edb704f5f43f0661a6886432ce3ba973f6592bb91af611f3
Contents?: true
Size: 284 Bytes
Versions: 1
Compression:
Stored size: 284 Bytes
Contents
# frozen_string_literal: true module ONEAccess module Serializable def represented_by(representer_class) @representer_class = representer_class end def from_json(json) obj = new @representer_class.new(obj).from_json(json) obj end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
oneaccess-0.4.5 | lib/oneaccess/serializable.rb |