Sha256: 6860197f5e8e741fdd3685f1fdad78fd09d8ca05c0412d9954c8a109ae618373
Contents?: true
Size: 308 Bytes
Versions: 3
Compression:
Stored size: 308 Bytes
Contents
# frozen_string_literal: true module Hahamut module Attribute # JSON Attribute class Json < Base def value @value ||= before_cast.as_json if before_cast.respond_to?(:as_json) @value ||= before_cast if before_cast.is_a?(Hash) @value ||= {} end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hahamut-0.1.2 | lib/hahamut/attribute/json.rb |
hahamut-0.1.1 | lib/hahamut/attribute/json.rb |
hahamut-0.1.0 | lib/hahamut/attribute/json.rb |