Skip to content

Instantly share code, notes, and snippets.

@njh
Created May 24, 2010 21:21
Show Gist options
  • Save njh/412440 to your computer and use it in GitHub Desktop.
Save njh/412440 to your computer and use it in GitHub Desktop.
#!/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
@njh
Copy link
Author

njh commented May 24, 2010

Thanks Arto :)

@datagraph
Copy link

Nick, see also http://github.com/datagraph/linkeddata which may come handy in DBpedia lite.

@njh
Copy link
Author

njh commented May 25, 2010

Reminds me of Bundle::* in CPAN :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment