Class: Konacha::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/konacha/engine.rb

Class Method Summary collapse

Class Method Details

.application(app) ⇒ Object



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

def self.application(app)
  Rack::Builder.app do
    use Rack::ShowExceptions

    map app.config.assets.prefix do
      run app.assets
    end

    map "/" do
      run Engine
    end
  end
end

.formattersObject



23
24
25
26
27
28
29
30
31
# File 'lib/konacha/engine.rb', line 23

def self.formatters
  if ENV['FORMAT']
    ENV['FORMAT'].split(',').map do |string|
      eval(string).new(STDOUT)
    end
  else
    [Konacha::Formatter.new(STDOUT)]
  end
end