Sha256: df2a52a1722b248d7e24b517d45412d999bc1ee910496d31c800fc824533ad29
Contents?: true
Size: 456 Bytes
Versions: 7
Compression:
Stored size: 456 Bytes
Contents
# frozen_string_literal: true module Acfs::Resource::Attributes class Base attr_reader :default def initialize(default: nil) @default = default end def cast(value) cast_value(value) unless value.nil? end def default_value if default.respond_to? :call default else cast default end end private def cast_value(_value) raise NotImplementedError end end end
Version data entries
7 entries across 7 versions & 1 rubygems