class WebConsole::WhinyRequest
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/web_console/whiny_request.rbs class WebConsole::WhinyRequest < WebConsole::SimpleDelegator def permitted?: () -> true def whine_unless: (true condition) -> true end
return false, an info log message will be displayed in users’ logs.
If any calls to permitted?
and acceptable_content_type?
Noisy wrapper around Request
.
def logger
def logger env["action_dispatch.logger"] || WebConsole.logger end
def permitted?
Experimental RBS support (using type sampling data from the type_fusion
project).
def permitted?: () -> true
This signature was generated using 1 sample from 1 application.
def permitted? whine_unless request.permitted? do "Cannot render console from #{request.strict_remote_ip}! " \ "Allowed networks: #{request.permissions}" end end
def request
def request __getobj__ end
def whine_unless(condition)
Experimental RBS support (using type sampling data from the type_fusion
project).
def whine_unless: (true condition) -> true
This signature was generated using 1 sample from 1 application.
def whine_unless(condition) unless condition logger.info { yield } end condition end