Skip to content

Instantly share code, notes, and snippets.

@jcoyne
Last active August 29, 2015 14:07
Show Gist options
  • Save jcoyne/f8bbdb6415b41107bbb2 to your computer and use it in GitHub Desktop.
Save jcoyne/f8bbdb6415b41107bbb2 to your computer and use it in GitHub Desktop.
require 'active_triples'
class Thing < ActiveTriples::Resource
property :rights, predicate: RDF::DC.rights
end
thing = Thing.new
thing.rights = RDF::URI.new('http://example.org/onlyAcademicUse')
puts "thing.rights = #{thing.rights}"
# => thing.rights = [#<ActiveTriples::Resource:0x3fc9e607f1f8(default)>]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment