14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/ddr/datastreams.rb', line 14
def self.const_missing(name)
case name
when :CONTENT, :EXTRACTED_TEXT, :FITS, :STRUCT_METADATA, :THUMBNAIL
Deprecation.warn(self, "Ddr::Datastreams::#{name} is deprecated." \
" Use Ddr::Models::File::#{name} instead.")
Ddr::Models::File.const_get(name)
when :DESC_METADATA
Deprecation.warn(self, "Ddr::Datastreams::DESC_METADATA is deprecated." \
" Use Ddr::Models::Metadata::DESC_METADATA instead.")
Ddr::Models::Metadata::DESC_METADATA
when :FitsDatastream
Deprecation.warn(self, "Ddr::Datastreams::FitsDatastream is deprecated." \
" Use Ddr::Models::FitsXmlFile instead.")
Ddr::Models::FitsXmlFile
when :StructuralMetadataDatastream
Deprecation.warn(self, "Ddr::Datastreams::StructuralMetadataDatastream is deprecated." \
" Use Ddr::Models::StructuralMetadataFile instead.")
Ddr::Models::StructuralMetadataFile
when :PlainTextDatastream
Deprecation.warn(self, "Ddr::Datastreams::PlainTextDatastream is deprecated." \
" Use Ddr::Models::File instead.")
Ddr::Models::File
else
super
end
end
|