Class: DataKitten::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/data_kitten/source.rb

Overview

Where the data has been sourced from Follows the pattern of http://purl.org/dc/terms/source with a http://www.w3.org/2000/01/rdf-schema#label and a http://www.w3.org/1999/02/22-rdf-syntax-ns#resource, and with useful aliases for other vocabularies

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Source

Create a new Source

Parameters:

  • options (Hash)

    the details of the Source.

Options Hash (options):

  • :label (String)

    The name of the Source

  • :resource (String)

    The URI of the Source



14
15
16
17
# File 'lib/data_kitten/source.rb', line 14

def initialize(options)
  @label = options[:label]
  @resource = options[:resource]
end

Instance Attribute Details

#labelString Also known as: name

Returns the URI of the Source.

Returns:

  • (String)

    the URI of the Source



21
22
23
# File 'lib/data_kitten/source.rb', line 21

def label
  @label
end

#resourceObject Also known as: web

Returns the value of attribute resource.



26
27
28
# File 'lib/data_kitten/source.rb', line 26

def resource
  @resource
end