Method: SmartEnum.lock_enum!
- Defined in:
- lib/smart_enum.rb
.lock_enum! ⇒ Object
108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/smart_enum.rb', line 108 def self.lock_enum! return if @enum_locked @enum_locked = true @_constantize_cache = nil @_descends_from_cache = nil _enum_storage.freeze class_descendants(self).each do |klass| klass.lock_enum! end end |