Module: Rapid::Web::StaticHelpers

Defined in:
lib/rapid/web/static_helpers.rb

Class Method Summary collapse

Class Method Details

.registered(app) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rapid/web/static_helpers.rb', line 6

def self.registered(app)
  files = [
    '/rapid/core/bootstrap-collapse.js',
    '/rapid/core/bootstrap-responsive.min.css',
    '/rapid/core/bootstrap.min.css',
    '/rapid/core/jquery-1.7.1.js',
    '/rapid/core/prettify.css',
    '/rapid/core/prettify.js',
  ]
  
  dir = ::File.expand_path ::File.join(::File.dirname(__FILE__), '..', '..', '..')
  files.each do |file|
    path = ::File.join(dir, 'public', file)
    
    app.get(file) { send_file path }
  end
  
end