Skip to content

Instantly share code, notes, and snippets.

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 afred/378b0cd152374964fd07 to your computer and use it in GitHub Desktop.
Save afred/378b0cd152374964fd07 to your computer and use it in GitHub Desktop.
Are class types enforced on ActiveTriples properties?
class MyDatastream < ActiveFedora::RDFDatastream
property :foo, predicate: ActiveTriples::Resource.new('http://example.com#foo'), class_name: 'Foo'
end
my_ds = MyDatastream.new
# I would expect this to whine.. but it doesn.
my_ds.foo = "this is definitely not a Foo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment