module
Latch::Extractor
Overview
Extractors try to extract metadata from the context they're given: the IO
object, the current state of the resulting metadata hash, or arbitrary
options passed to the upload method of the uploader.
Direct including types
- Latch::Extractor::DimensionsFromMagick
- Latch::Extractor::DimensionsFromVips
- Latch::Extractor::FilenameFromIO
- Latch::Extractor::MimeFromExtension
- Latch::Extractor::MimeFromFile
- Latch::Extractor::MimeFromIO
- Latch::Extractor::SizeFromIO
Defined in:
latch/extractor.crInstance Method Summary
-
#extract(uploaded_file : Latch::UploadedFile, metadata : MetadataHash, **options) : MetadataValue | Nil
Extracts metadata and returns a
MetadataValue.
Instance Method Detail
abstract
def extract(uploaded_file : Latch::UploadedFile, metadata : MetadataHash, **options) : MetadataValue | Nil
#
Extracts metadata and returns a MetadataValue. Alternatively, the
metadata hash may be modified directly if multiple values need to be added
(e.g. the dimensions of an image).