fix regexp and class method. use %r{}, class << self