Skip to content

Instantly share code, notes, and snippets.

@elrayle
Last active August 2, 2016 16:43
Show Gist options
  • Save elrayle/c78c8458e7bc6ccc9b31a865dae4f9cb to your computer and use it in GitHub Desktop.
Save elrayle/c78c8458e7bc6ccc9b31a865dae4f9cb to your computer and use it in GitHub Desktop.
Problems and potential workarounds for annotation's body being nil
# defined in Annotation
# NOTE: No class defined, so holds URI string only
property :hasBody, :predicate => RDF::Vocab::OA.hasBody
# in PRY
generic_annotation = Annotation.new(uri_or_str)
body_uri = generic_annotation.hasBody
body = ActiveTriples::Resource(body_uri)
body.statements # => []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment