def attr_normalized(attr_name, range, max_delta = MAX_DELTA)
      @_normalized_attrs ||= {}
      @_normalized_attrs[attr_name] = AttrContainer.new(range, max_delta)
      const_set("MAX_#{attr_name.to_s.upcase}", @_normalized_attrs[attr_name].max)
      const_set("MIN_#{attr_name.to_s.upcase}", @_normalized_attrs[attr_name].min)
      define_method("normalize_#{attr_name}") do |current_value, new_value|
        return new_value unless new_value
        self.class.normalized_attrs(attr_name).normalize(self, current_value, new_value)
      end
    end
def attr_normalized(attr_name, range, max_delta = MAX_DELTA)
      @_normalized_attrs ||= {}
      @_normalized_attrs[attr_name] = AttrContainer.new(range, max_delta)
      const_set("MAX_#{attr_name.to_s.upcase}", @_normalized_attrs[attr_name].max)
      const_set("MIN_#{attr_name.to_s.upcase}", @_normalized_attrs[attr_name].min)
      define_method("normalize_#{attr_name}") do |current_value, new_value|
        return new_value unless new_value
        self.class.normalized_attrs(attr_name).normalize(self, current_value, new_value)
      end
    end
INFINITY