Module: Sinatra::LinkedData
- Defined in:
- lib/sinatra/linkeddata.rb,
lib/sinatra/linkeddata/version.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
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 35 |
# File 'lib/sinatra/linkeddata.rb', line 28 def self.registered(app) = {} app.set :linkeddata_options, app.use(Rack::LinkedData::ContentNegotiation, ) app.helpers(Sinatra::LinkedData::Helpers) app.send(:include, ::RDF) app.send(:include, ::LinkedData) end |