Sha256: df0b62f41ded47cade783ab2672ae6276c5fd3962ea5eefdd1fe9a7a2422201d

Contents?: true

Size: 919 Bytes

Versions: 2

Compression:

Stored size: 919 Bytes

Contents

module Popolo
  # A source of information.
  #
  # Turtle document: @todo move into popoloproject.com
  #
  #     <http://example.com/sources/67cc67093475061e3d95369d.ttl>
  #       rdfs:label "news.google.com";
  #       dcterms:identifier "67cc67093475061e3d95369d";
  #       dcterms:modified "2012-01-01T00:00:00Z"^^xsd:dateTime .
  #
  # @see http://dublincore.org/documents/dcmi-terms/
  # @todo Add the ETag to the Turtle document.
  class Source
    include Mongoid::Document

    embedded_in :sourceable, polymorphic: true

    # A human-readable unique identifier for the source, e.g. "news.google.com".
    field :name, type: String
    # The source's ETag.
    field :etag, type: String
    # The source's last modified timestamp.
    field :last_modified, type: Time
    # Any additional information about the source.
    field :extra, type: Hash

    validates_presence_of :name, :last_modified
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
popolo-0.0.2 app/models/popolo/source.rb
popolo-0.0.1 app/models/popolo/source.rb