Sha256: 674421b9c3a9b1a6fa78fa77c02181e916d17787cd80bf955a8c3e05673ee2b3
Contents?: true
Size: 569 Bytes
Versions: 23
Compression:
Stored size: 569 Bytes
Contents
# frozen_string_literal: true require_relative 'attribute_set_mixin' module LedgerSync module Serialization class SerializerAttributeSet include AttributeSetMixin def add(attribute) raise 'hash_attribute is missing' unless attribute.hash_attribute.present? if attributes.key?(attribute.hash_attribute.to_s) raise "hash_attribute already defined for #{serializer_class.name}: #{attribute.hash_attribute}" end @attributes[attribute.hash_attribute] = attribute attribute end end end end
Version data entries
23 entries across 23 versions & 1 rubygems