Module: Interpol::DocumentationApp

Extended by:
DocumentationApp
Included in:
DocumentationApp
Defined in:
lib/interpol/documentation_app.rb

Overview

Provides the interpol documentation app.

Defined Under Namespace

Modules: Helpers Classes: AssetInliner, Builder

Instance Method Summary collapse

Instance Method Details

#build(&block) ⇒ Object



11
12
13
14
# File 'lib/interpol/documentation_app.rb', line 11

def build(&block)
  config = Configuration.default.customized_duplicate(&block)
  Builder.new(config).app
end

#render_static_page(&block) ⇒ Object



16
17
18
19
20
21
# File 'lib/interpol/documentation_app.rb', line 16

def render_static_page(&block)
  require 'rack/mock'
  app = build(&block)
  status, headers, body = app.call(Rack::MockRequest.env_for "/", :method => "GET")
  AssetInliner.new(body.enum_for(:each).to_a.join, app.public_folder).standalone_page
end