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

Instance Attribute Details

#dc_contributorObject

Entity responsible for contributing this item.



33
34
35
# File 'lib/syndication/dublincore.rb', line 33

def dc_contributor
  @dc_contributor
end

#dc_coverageObject

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_creatorObject

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_dateObject

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_descriptionObject

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_formatObject

Physical or digital format of item.



53
54
55
# File 'lib/syndication/dublincore.rb', line 53

def dc_format
  @dc_format
end

#dc_identifierObject

An unambigious identifier which identifies the item.



56
57
58
# File 'lib/syndication/dublincore.rb', line 56

def dc_identifier
  @dc_identifier
end

#dc_languageObject

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_publisherObject

Entity responsible for making the item available.



30
31
32
# File 'lib/syndication/dublincore.rb', line 30

def dc_publisher
  @dc_publisher
end

#dc_relationObject

A reference to a related resource.



65
66
67
# File 'lib/syndication/dublincore.rb', line 65

def dc_relation
  @dc_relation
end

#dc_rightsObject

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_sourceObject

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_subjectObject

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_titleObject

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_typeObject

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