Module: YmlErrorResponder

Defined in:
lib/yml_error_responder.rb,
lib/yml_error_responder/engine.rb,
lib/yml_error_responder/version.rb,
lib/yml_error_responder/responder.rb,
lib/yml_error_responder/yml_mapper.rb,
lib/yml_error_responder/error_handlers.rb,
app/helpers/yml_error_responder/application_helper.rb,
app/controllers/yml_error_responder/errors_controller.rb,
lib/yml_error_responder/error_handlers/base_error_handler.rb,
app/controllers/yml_error_responder/application_controller.rb,
lib/yml_error_responder/error_handlers/unknow_error_handler.rb,
lib/yml_error_responder/error_handlers/default_error_handler.rb,
app/controllers/yml_error_responder/errors_example_controller.rb

Defined Under Namespace

Modules: ApplicationHelper, ErrorHandlers, Responder, YmlMapper Classes: ApplicationController, Engine, ErrorsController, ErrorsExampleController

Constant Summary collapse

VERSION =
"1.0.6"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configuration_pathObject

Returns the value of attribute configuration_path.



15
16
17
# File 'lib/yml_error_responder.rb', line 15

def configuration_path
  @configuration_path
end

.handle_unknown_errorObject

Returns the value of attribute handle_unknown_error.



16
17
18
# File 'lib/yml_error_responder.rb', line 16

def handle_unknown_error
  @handle_unknown_error
end

.unknown_error_loggerObject

Returns the value of attribute unknown_error_logger.



17
18
19
# File 'lib/yml_error_responder.rb', line 17

def unknown_error_logger
  @unknown_error_logger
end

Class Method Details

.log_unknown_error_with(&block) ⇒ Object



23
24
25
# File 'lib/yml_error_responder.rb', line 23

def log_unknown_error_with(&block)
  @unknown_error_logger = block
end

.routes(application) ⇒ Object



27
28
29
30
31
# File 'lib/yml_error_responder.rb', line 27

def routes(application)
  unless Rails.env.production?
    application.mount YmlErrorResponder::Engine => "/api/yml_error_responder"
  end
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



19
20
21
# File 'lib/yml_error_responder.rb', line 19

def setup
  yield self
end