Sha256: 8ece2fe5977a1657b936ac3be1acc2ed5ceb14dbd20342b6f1238898d606b762
Contents?: true
Size: 358 Bytes
Versions: 1
Compression:
Stored size: 358 Bytes
Contents
module Arrest class Ref include HasAttributes attribute :ref_id, String attribute :ref_type, String end class PolymorphicAttribute < NestedAttribute def initialize name, read_only super name, read_only, Ref end def from_hash(parent, value) return nil unless value != nil @clazz.new(value) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
arrest-0.0.39 | lib/arrest/attributes/polymorphic_attribute.rb |