Class: EasyData::RDF::RSS

Inherits:
Namespaces show all
Defined in:
lib/data_models/namespaces/rss.rb

Constant Summary collapse

@@uri =
"http://purl.org/rss/1.0/"
@@properties =
{"description" => "",
 "items" => "",
 "link" => "",
 "name" => "",
 "title" => "",
 "url" => "" 
}

Class Method Summary collapse

Methods inherited from Namespaces

list, list_form

Class Method Details

.get_uriObject

Return Namespace URI



15
16
17
# File 'lib/data_models/namespaces/rss.rb', line 15

def self.get_uri
  @@uri
end

.propertiesObject

Return a list of Namespace’s properties



25
26
27
# File 'lib/data_models/namespaces/rss.rb', line 25

def self.properties
   @@properties.keys
end

.properties_formObject



29
30
31
32
33
34
35
# File 'lib/data_models/namespaces/rss.rb', line 29

def self.properties_form 
  list = {}
  @@properties.keys.each do |property|
    list[property] = property
  end
  list
end

.to_s(property, uri, value) ⇒ Object

Return tag to rdf doc



20
21
22
# File 'lib/data_models/namespaces/rss.rb', line 20

def self.to_s(property,uri,value)
   @@properties[property].gsub("%uri%",uri).gsub('%value%',value)
end