Module: Syndication::DublinCore
- Included in:
- RSS::Channel, RSS::Image, RSS::Item, RSS::TextInput
- Defined in:
- lib/syndication/dublincore.rb
Overview
Mixin for Dublin Core metadata in RSS feeds.
If you require ‘syndication/dublincore’ these methods are added to the Syndication::Channel, Syndication::Item, Syndication::Image and Syndication::TextInput classes.
The access method names are the Dublin Core element names, prefixed with dc_.
Instance Attribute Summary collapse
-
#dc_contributor ⇒ Object
Entity responsible for contributing this item.
-
#dc_coverage ⇒ Object
The extent or scope of coverage of the item, e.g.
-
#dc_creator ⇒ Object
The entity primarily responsible for making the content of the item.
-
#dc_date ⇒ Object
Date of creation or availability of item.
-
#dc_description ⇒ Object
A description of the content of the item.
-
#dc_format ⇒ Object
Physical or digital format of item.
-
#dc_identifier ⇒ Object
An unambigious identifier which identifies the item.
-
#dc_language ⇒ Object
The language the item is in, coded as per RFC 1766.
-
#dc_publisher ⇒ Object
Entity responsible for making the item available.
-
#dc_relation ⇒ Object
A reference to a related resource.
-
#dc_rights ⇒ Object
Information about rights held over the item, e.g.
-
#dc_source ⇒ Object
A reference to a resource from which the item is derived.
-
#dc_subject ⇒ Object
The topic of the content of the item, typically as keywords or key phrases.
-
#dc_title ⇒ Object
A name by which the item is formally known.
-
#dc_type ⇒ Object
Nature or genre of item, usually from a controlled vocabulary.
Instance Attribute Details
#dc_contributor ⇒ Object
Entity responsible for contributing this item.
33 34 35 |
# File 'lib/syndication/dublincore.rb', line 33 def dc_contributor @dc_contributor end |
#dc_coverage ⇒ Object
The extent or scope of coverage of the item, e.g. a geographical area.
68 69 70 |
# File 'lib/syndication/dublincore.rb', line 68 def dc_coverage @dc_coverage end |
#dc_creator ⇒ Object
The entity primarily responsible for making the content of the item.
20 21 22 |
# File 'lib/syndication/dublincore.rb', line 20 def dc_creator @dc_creator end |
#dc_date ⇒ Object
Date of creation or availability of item. Returned as a DateTime if it will parse; otherwise, returned as a string. (Dublin Core does not require any particular date and time format, so guaranteeing parsing is not possible.)
39 40 41 42 43 44 |
# File 'lib/syndication/dublincore.rb', line 39 def dc_date if @dc_date and !@dc_date.kind_of?(DateTime) @dc_date = DateTime.parse(@dc_date) end return @dc_date end |
#dc_description ⇒ Object
A description of the content of the item.
27 28 29 |
# File 'lib/syndication/dublincore.rb', line 27 def dc_description @dc_description end |
#dc_format ⇒ Object
Physical or digital format of item.
53 54 55 |
# File 'lib/syndication/dublincore.rb', line 53 def dc_format @dc_format end |
#dc_identifier ⇒ Object
An unambigious identifier which identifies the item.
56 57 58 |
# File 'lib/syndication/dublincore.rb', line 56 def dc_identifier @dc_identifier end |
#dc_language ⇒ Object
The language the item is in, coded as per RFC 1766.
62 63 64 |
# File 'lib/syndication/dublincore.rb', line 62 def dc_language @dc_language end |
#dc_publisher ⇒ Object
Entity responsible for making the item available.
30 31 32 |
# File 'lib/syndication/dublincore.rb', line 30 def dc_publisher @dc_publisher end |
#dc_relation ⇒ Object
A reference to a related resource.
65 66 67 |
# File 'lib/syndication/dublincore.rb', line 65 def dc_relation @dc_relation end |
#dc_rights ⇒ Object
Information about rights held over the item, e.g. copyright or patents.
71 72 73 |
# File 'lib/syndication/dublincore.rb', line 71 def dc_rights @dc_rights end |
#dc_source ⇒ Object
A reference to a resource from which the item is derived.
59 60 61 |
# File 'lib/syndication/dublincore.rb', line 59 def dc_source @dc_source end |
#dc_subject ⇒ Object
The topic of the content of the item, typically as keywords or key phrases.
24 25 26 |
# File 'lib/syndication/dublincore.rb', line 24 def dc_subject @dc_subject end |
#dc_title ⇒ Object
A name by which the item is formally known.
17 18 19 |
# File 'lib/syndication/dublincore.rb', line 17 def dc_title @dc_title end |
#dc_type ⇒ Object
Nature or genre of item, usually from a controlled vocabulary.
50 51 52 |
# File 'lib/syndication/dublincore.rb', line 50 def dc_type @dc_type end |