Module: SmartCore::Engine::Frozener
- Defined in:
- lib/smart_core/engine/frozener.rb
Overview
Defined Under Namespace
Modules: Mixin
Constant Summary collapse
- FROZENER =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Object.new.method(:freeze).unbind.tap(&:freeze)
- FROZEN_CHECK =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Object.new.method(:frozen?).unbind.tap(&:freeze)
Class Method Summary collapse
Class Method Details
.freeze(object) ⇒ object
46 47 48 49 50 51 |
# File 'lib/smart_core/engine/frozener.rb', line 46 def freeze(object) # rubocop:disable Performance/BindCall # NOTE: disabled in order to support older Ruby versions than Ruby@3 FROZENER.bind(object).call # rubocop:enable Performance/BindCall end |
.frozen?(object) ⇒ Boolean
59 60 61 62 63 64 |
# File 'lib/smart_core/engine/frozener.rb', line 59 def frozen?(object) # rubocop:disable Performance/BindCall # NOTE: disabled in order to support older Ruby versions than Ruby@3 FROZEN_CHECK.bind(object).call # rubocop:enable Performance/BindCall end |