Skip to content

Commit

Permalink
require rdf/vocab in readme examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ConorSheehan1 authored and gkellogg committed Nov 8, 2018
1 parent 1134c51 commit 320723e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Expand Up @@ -15,11 +15,14 @@ or to create a new store of RDF data based on simple defaults.

An introductory blog post is at <http://blog.datagraph.org/2010/05/spira>

A changelog is available in the {file:CHANGES.md} file.
A changelog is available in the [CHANGES.md](CHANGES.md) file.

### Example

```ruby
require 'spira'
require 'rdf/vocab'

class Person < Spira::Base

configure :base_uri => "http://example.org/example/people"
Expand Down Expand Up @@ -110,6 +113,7 @@ without the `RDF::` prefix. For example:

```ruby
require 'spira'
require 'rdf/vocab'

class CD < Spira::Base
configure :base_uri => 'http://example.org/cds'
Expand Down Expand Up @@ -210,6 +214,9 @@ CD.for RDF::URI.new('http://example.org/cds/queens-greatest-hits')
A class with a `type` set is assigned an `RDF.type` on creation and saving.

```ruby
require 'spira'
require 'rdf/vocab'

class Album < Spira::Base
type RDF::URI.new('http://example.org/types/album')
property :name, :predicate => RDF::Vocab::DC.title
Expand Down

0 comments on commit 320723e

Please sign in to comment.