Class: RailsSpotlight::Middlewares::Handlers::DirectoryIndexActionHandler

Inherits:
BaseActionHandler
  • Object
show all
Defined in:
lib/rails_spotlight/middlewares/handlers/directory_index_action_handler.rb

Constant Summary

Constants inherited from BaseActionHandler

BaseActionHandler::Forbidden, BaseActionHandler::IncorrectResponseContentType, BaseActionHandler::NotFound, BaseActionHandler::UnprocessableEntity

Instance Attribute Summary

Attributes inherited from BaseActionHandler

#content_type, #request, #request_id

Instance Method Summary collapse

Methods inherited from BaseActionHandler

#call, #initialize

Constructor Details

This class inherits a constructor from RailsSpotlight::Middlewares::Handlers::BaseActionHandler

Instance Method Details

#executeObject



11
12
13
14
15
# File 'lib/rails_spotlight/middlewares/handlers/directory_index_action_handler.rb', line 11

def execute
  @result = directory_to_json(::RailsSpotlight.config.rails_root)
rescue => e # rubocop:disable Style/RescueStandardError
  raise UnprocessableEntity, e.message
end