Sha256: 927fcca4a91f5cb59ffef35f564082378b211eeeac979e6ba336e8c812e3ab00
Contents?: true
Size: 468 Bytes
Versions: 22
Compression:
Stored size: 468 Bytes
Contents
# frozen_string_literal: true module LazyRecord # Generate dynamic modules for dynamic methods created with #define_method, # for insertion into inheritance chain. This allows you to make calls to # super for these methods. module DynamicModules def get_or_set_mod(module_name) if const_defined?(module_name, _search_ancestors = false) const_get(module_name) else const_set(module_name, Module.new) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems