Module: Mindmap

Defined in:
lib/mindmap.rb,
lib/mindmap/cli.rb,
lib/mindmap/node.rb,
lib/mindmap/version.rb,
lib/mindmap/renderer.rb,
lib/mindmap/application.rb

Defined Under Namespace

Modules: Node Classes: Application, CLI, Renderer

Constant Summary collapse

VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.applicationObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/mindmap.rb', line 7

def self.application
  apps = []

  apps.unshift Application.new
  apps.unshift Rack::Static.new(apps.first, urls: [''], root: File.expand_path('../public', __dir__), index: 'index.html')


  project_public = File.expand_path('./public', Dir.pwd)

  if File.exist?(project_public)
    apps.unshift Rack::Static.new(apps.first, urls: [''], root: project_public, index: 'index.html')
  end

  Rack::Cascade.new(apps)
end