Move @pattern into Methods.jl