Class: Nutcracker::Web::App

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/nutcracker/web/app.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nutcracker, external_servers = []) ⇒ App

Returns a new instance of App.



17
18
19
20
21
# File 'lib/nutcracker/web/app.rb', line 17

def initialize(nutcracker, external_servers = [])
  @nutcracker = nutcracker
  @external_servers = external_servers
  super()
end

Class Method Details

.assetsObject



55
56
57
58
59
60
61
62
# File 'lib/nutcracker/web/app.rb', line 55

def self.assets
  require 'sprockets'
  Sprockets::Environment.new { |env|
    %w(javascripts stylesheets templates).each { |asset|
      env.append_path File.join(settings.root,"assets/#{asset}")
    }
  }
end