Class: Scrivito::MetaDataCollection
- Inherits:
-
Object
- Object
- Scrivito::MetaDataCollection
- Defined in:
- app/cms/scrivito/meta_data_collection.rb
Overview
This class represents a collection of meta data attributes.
Available meta data attributes
All binaries have the meta attributes content_length, content_type and filename, in
addition, PDFs and images have attributes specific to their type.
If not specified otherwise, the attributes contain string values.
[+content_length (Number)+] Size in bytes of the given file. [+content_type+] MIME-type of the given file. [+filename+] The file basename, including the file extension.
Available meta data attributes for PDFs
[+text+] Text content of the PDF document.
Available meta data attributes for Images
The meta data attributes starting with iptc_ or exif_ are extracted from the image itself
and therefore may not be available for every image. Iptc and exif are both standardized
formats supported by a wide array of software and hardware, like cameras and phones.
[+width (Number)+] Width in pixels. [+height (Number)+] Height in pixels. [+exif_copyright+] Copyright of the image. [+exif_date_time+] The date at which the image was produced.
[+iptc_keywords (Array
Searching for meta data
Meta data is taken into account when searching. See the ObjSearchEnumerator for details.
Instance Method Summary collapse
-
#[](name) ⇒ String, ...
Find value of a meta data attribute.
Instance Method Details
#[](name) ⇒ String, ...
Find value of a meta data attribute.
65 66 67 |
# File 'app/cms/scrivito/meta_data_collection.rb', line 65 def [](name) @attributes[name] end |