code: def root_path
        defined?(Rails) && Rails.root ||
        defined?(Sinatra::Application) && Pathname.new(Sinatra::Application.root) ||
        defined?(ROOT_DIR) && Pathname.new(ROOT_DIR)
      end
docs: Internal: Returns the root path of the project
   TODO: Extract Rails and Sinatra integration.