Method: VacuumCleaner::Normalizations::ClassMethods#normalized_attributes
- Defined in:
- lib/vacuum_cleaner/normalizations.rb
#normalized_attributes ⇒ Object
List of already normalized attributes, to keep everything safe when calling normalizes twice for a certain attribute.
When called for the first time checks it’s superclass for any normalized attributes.
22 23 24 25 26 |
# File 'lib/vacuum_cleaner/normalizations.rb', line 22 def normalized_attributes @normalized_attributes ||= [].tap do |ary| superclass.normalized_attributes.each { |a| ary << a } if superclass && superclass.respond_to?(:normalized_attributes) end end |