Module: Sinatra::RDF
- Defined in:
- lib/sinatra/rdf.rb
Overview
To override negotiation on Content-Type, set :format in linkeddata_options
to a RDF Format class, or symbol identifying a format.
Defined Under Namespace
Modules: Helpers
Class Method Summary collapse
-
.registered(app)
-
Registers Rack::LinkedData::ContentNegotiation * adds helpers * includes RDF and LinkedData * defines
linkeddata_options
, which are passed to the Rack middleware available assettings.linkeddata_options
and as options within the LinkedData Rack middleware.
-
Class Method Details
.registered(app)
This method returns an undefined value.
-
Registers Rack::LinkedData::ContentNegotiation
-
adds helpers
-
includes RDF and LinkedData
-
defines
linkeddata_options
, which are passed to the Rack middleware available assettings.linkeddata_options
and as options within the LinkedData Rack middleware.
28 29 30 31 32 33 34 |
# File 'lib/sinatra/rdf.rb', line 28 def self.registered(app) = {} app.set :linkeddata_options, app.use(Rack::RDF::ContentNegotiation, ) app.helpers(Sinatra::RDF::Helpers) app.send(:include, ::RDF) end |