8000 GitHub - bbc/to-rdf: A small gem to serialize Ruby objects as RDF · GitHub
[go: up one dir, main page]

Skip to content
Dismiss alert
bbcPublic

About

A small gem to serialize Ruby objects as RDF

Resources

Security policy

Stars

3 stars

Watchers

25 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

< 8000 td class="react-directory-row-name-cell-small-screen" colSpan="2">
NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

to-rdf

A small gem to serialize Ruby objects as RDF.

Example use

require 'to_rdf'
require 'uri'

class Actor

  include ToRdf

  attr_accessor :name, :id

  def uri
    URI("http://example.com/actors/#{id}")
  end

  def type_uri
    URI("http://example.com/schema/Actor")
  end

  def rdf_mapping
    {
      "foaf:name" => name
    }
  end
end

actor = Actor.new
actor.id = 1
actor.name = "John Doe"
actor.to_rdf

About

A small gem to serialize Ruby objects as RDF

Resources

Security policy

Stars

3 stars

Watchers

25 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0