Module: ConsoleUtils::OtherUtils
- Defined in:
- lib/console_utils/other_utils.rb
Defined Under Namespace
Classes: Shutting
Instance Method Summary collapse
-
#clr ⇒ Object
Pastel
shorthand. -
#shutting(*args, &block) ⇒ Object
:call-seq: shutting(:engine_key[, to: logger_level]) {}.
Instance Method Details
#clr ⇒ Object
Pastel
shorthand
4 5 6 |
# File 'lib/console_utils/other_utils.rb', line 4 def clr ConsoleUtils.pastel end |
#shutting(*args, &block) ⇒ Object
:call-seq:
shutting(:engine_key[, to: logger_level]) {}
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) { ... }
23 24 25 |
# File 'lib/console_utils/other_utils.rb', line 23 def shutting(*args, &block) Shutting.(*args, &block) end |