Module: Newsmlg2::Base::DescriptiveMetadataGroup

Included in:
ContentMeta, PartMeta, Planning, Types::EventNewsCoverage
Defined in:
lib/newsmlg2/base/descriptive_metadata_group.rb

Overview

A group of properties associated with the full descriptive facet of news-related content (contentmeta.py).

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/newsmlg2/base/descriptive_metadata_group.rb', line 8

def self.included(klass)
  klass.class_eval do
    xml_element :languages, xml: 'language',
                            type: Newsmlg2::Types::Language, collection: true
    xml_element :genres, xml: 'genre',
                         type: Newsmlg2::Types::Genre, collection: true
    xml_element :keywords, xml: 'keyword',
                           type: Newsmlg2::Types::Keyword, collection: true
    xml_element :subjects, xml: 'subject',
                           type: Newsmlg2::Types::Subject, collection: true
    xml_element :sluglines, xml: 'slugline',
                            type: Newsmlg2::Types::Slugline, collection: true
    xml_element :headlines, xml: 'headline',
                            type: Newsmlg2::Types::Headline, collection: true
    xml_element :datelines, xml: 'dateline',
                            type: Newsmlg2::Types::Dateline, collection: true
    xml_element :by, xml: 'by', type: Newsmlg2::Types::By, collection: true
    xml_element :creditlines, xml: 'creditline',
                              type: Newsmlg2::Types::Creditline, collection: true
    xml_element :descriptions, xml: 'description',
                               type: Newsmlg2::Types::ContentDescription, collection: true
  end
end