Method: Impression::FileTree#render_from_path_info

Defined in:
lib/impression/file_tree.rb

#render_from_path_info(req, path_info) ⇒ void

This method returns an undefined value.

Renders a response from the given path info.

Parameters:



39
40
41
42
43
44
45
46
47
48
# File 'lib/impression/file_tree.rb', line 39

def render_from_path_info(req, path_info)
  case path_info[:kind]
  when :not_found
    req.respond(nil, ':status' => Qeweney::Status::NOT_FOUND)
  when :file
    render_file(req, path_info)
  else
    raise "Invalid path info kind #{path_info[:kind].inspect}"
  end
end