Skip to content

Instantly share code, notes, and snippets.

@njh
Created May 24, 2010 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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 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