bash add class methods to pattern classes named