Class: Rack::App::FrontEnd::FolderMounter

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/app/front_end/folder_mounter.rb

Constant Summary collapse

LAST_MODIFIED_HEADER =
"Last-Modified"

Instance Method Summary collapse

Constructor Details

#initialize(app_class) ⇒ FolderMounter

Returns a new instance of FolderMounter.



5
6
7
# File 'lib/rack/app/front_end/folder_mounter.rb', line 5

def initialize(app_class)
  @app_class = app_class
end

Instance Method Details

#mount(absolute_folder_path) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/rack/app/front_end/folder_mounter.rb', line 9

def mount(absolute_folder_path)
  template_paths_for(absolute_folder_path).each do |template_path|

    request_path = request_path_by(absolute_folder_path, template_path)
    create_endpoint_for(request_path, template_path)

  end
end