module ConsoleUtils::OtherUtils
Public Instance Methods
clr()
click to toggle source
Pastel
shorthand
# File lib/console_utils/other_utils.rb, line 4 def clr ConsoleUtils.pastel end
shutting(:engine_key[, to: logger_level]) {}
click to toggle source
Shuts up logger of Rails engine by a given key (:rails
, :record
, :controller
or :view
).
shutting(:view, to: :warn) do ActionView.logger.info("not printed") ActionView.logger.warn("printed") Rails.logger.info("printed") end shutting(:rails, to: Logger::INFO) { ... } shutting(:record, to: 1) { ... }
# File lib/console_utils/other_utils.rb, line 23 def shutting(*args, &block) Shutting.(*args, &block) end