Method: Sequel::Plugins::SingleTableInheritance::ClassMethods#freeze

Defined in:
lib/sequel/plugins/single_table_inheritance.rb

#freezeObject

Freeze STI information when freezing model class. Note that because of how STI works, you should not freeze an STI subclass until after all subclasses of it have been created.



158
159
160
161
162
163
164
# File 'lib/sequel/plugins/single_table_inheritance.rb', line 158

def freeze
  @sti_key_array.freeze if @sti_key_array
  @sti_key_map.freeze if @sti_key_map.is_a?(Hash)
  @sti_model_map.freeze if @sti_model_map.is_a?(Hash)

  super
end