Sha256: ebd3278fe0cf89769ce329f8bc367b1c6f2a8141892f8ac7d0790688914e66be
Contents?: true
Size: 614 Bytes
Versions: 22
Compression:
Stored size: 614 Bytes
Contents
# frozen_string_literal: true require_relative 'value' module LedgerSync module Type class Hash < Value # :nodoc: include ValueMixin def cast? true end def changed_in_place?(raw_old_value, new_value) raw_old_value != new_value if new_value.is_a?(::Hash) end def type :id end def valid_classes [::Hash] end private def cast_value(args = {}) value = args.fetch(:value) case value when ::Hash then value.clone else { value: value } end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems