Method: Familia::Features::SafeDump.included
- Defined in:
- lib/familia/features/safe_dump.rb
.included(base) ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/familia/features/safe_dump.rb', line 104 def self.included base Familia.ld "[#{self}] Enabled in #{base}" base.extend ClassMethods # Optionally define safe_dump_fields in the class to make # sure we always have an array to work with. unless base.instance_variable_defined?(:@safe_dump_fields) base.instance_variable_set(:@safe_dump_fields, []) end # Ditto for the field map unless base.instance_variable_defined?(:@safe_dump_field_map) base.instance_variable_set(:@safe_dump_field_map, {}) end end |