def decorate(block = nil, name: "generated", &callback)
      @decorations << callback

      if block
        alias_name = "__" << name.to_s.downcase.gsub(/[^a-z]+/, ?_) << ?1
        alias_name = alias_name.succ while private_method_defined? alias_name or method_defined? alias_name
        without_decorations { define_method(name, &block) }
        alias_method(alias_name, name)
        remove_method(name)
        private(alias_name)
      end
    end
def decorate(block = nil, name: "generated", &callback)
      @decorations << callback

      if block
        alias_name = "__" << name.to_s.downcase.gsub(/[^a-z]+/, ?_) << ?1
        alias_name = alias_name.succ while private_method_defined? alias_name or method_defined? alias_name
        without_decorations { define_method(name, &block) }
        alias_method(alias_name, name)
        remove_method(name)
        private(alias_name)
      end
    end
Set up a decoration.

 @param [Proc, UnboundMethod, nil] block used for defining a method right away
 @param [String, Symbol] name given to the generated method if block is given
 @yield callback called with method name once method is defined
 @yieldparam [Symbol] method name of the method that is to be decorated