Module: Sinatra::CqDocs

Defined in:
lib/sinatra/cqdocs.rb

Defined Under Namespace

Modules: Helpers

Class Method Summary collapse

Class Method Details

.registered(app) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/sinatra/cqdocs.rb', line 43

def self.registered(app)
    app.helpers NiftyDocs::Helpers

    unless defined?(settings.template_engine)
        app.set :template_engine, :haml
    end

    app.set :cqdocs_view_path, File.expand_path('../views/', __FILE__)

    app.get "/body_components.html" do
        view_location = File.expand_path('../views', __FILE__)
        send settings.template_engine,  get_view_as_string("body_components.#{settings.template_engine}"), :layout => :"layouts/sample_markup", :views => view_location
    end
end