Sha256: 955d865f173c9634798c7f65be60bd7bc5988848792a9000f720c55e091ce50b
Contents?: true
Size: 664 Bytes
Versions: 38
Compression:
Stored size: 664 Bytes
Contents
module Foobara module BuiltinTypes module Attributes module Casters class Array < AssociativeArray::Casters::Array def applicable?(value) if super hash_caster.applicable?(to_h(value)) end end def applies_message "be a an array of pairs" end def cast(array) hash_caster.cast(super) end private def hash_caster @hash_caster ||= Hash.instance end def to_h(value) method(:cast).super_method.call(value) end end end end end end
Version data entries
38 entries across 38 versions & 1 rubygems