Created
May 24, 2010 21:21
-
-
Save njh/412440 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'spira' | |
require 'rdf' | |
include RDF | |
class Person | |
include Spira::Resource | |
type FOAF.Person | |
base_uri "http://example.com/people/" | |
property :name, :predicate => FOAF.name, :type => String | |
property :homepage, :predicate => FOAF.homepage | |
end | |
person = Person.new(5) | |
person.name = "Joe Bloggs" | |
person.homepage = URI("http://www.example.com/foo/") | |
p person.name |
Nick, see also http://github.com/datagraph/linkeddata which may come handy in DBpedia lite.
Reminds me of Bundle::* in CPAN :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks Arto :)