def transform_attrs(*attrs, with: nil, new_module: false, &block)
      block ||= TransformAttrs.fetch_block(with)
      mod = Module.new.tap { |x| public_send(new_module, x) } if new_module
      mod ||= transform_attrs_methods
      mod.class_eval do
        attrs.each do |attr|
          define_method("#{attr}=") { |val| super(block[val]) }
        end
      end
    end
def transform_attrs(*attrs, with: nil, new_module: false, &block)
      block ||= TransformAttrs.fetch_block(with)
      mod = Module.new.tap { |x| public_send(new_module, x) } if new_module
      mod ||= transform_attrs_methods
      mod.class_eval do
        attrs.each do |attr|
          define_method("#{attr}=") { |val| super(block[val]) }
        end
      end
    end
Options:

 - `with` - use built-in transfromers from TransformAttrs.transformations.
   Add new transformations with TransformAttrs.register.
 - `new_module` - create new module for generated methods.
   Accepts `:prepend` or `:include`. By default it uses single module
   which is prepended.

   transform_attrs(:attr1, :attr2) { |x| x.to_s.downcase }
   transform_attrs(:attr3, &:presence) # to nullify blanks
   transform_attrs(:attr4, with: :strip)
   transform_attrs(:attr4, with: [:strip, :nullify])
   transform_attrs(:attr5, new_module: :include)