An alternative that may be cleaner since it does not involve using the regexp engine is:

```ruby
NAMESPACE_PREFIX = 'Yardstick::Rules::'.freeze

# ...

key = rule_class.to_s[NAMESPACE_PREFIX.length..-1].to_sym
```

My background before coming to ruby was perl, so regexps are quite natural, however I try not to use them when there are primitive methods in `String` that can do the same thing. I'll use a regexp when the alternative is more complex, but I think in this case it's probably not warranted. In simple cases (which are usually the common case) using `String` methods are preferable, not just for understandability but for performance.. often they are much faster. It's also good to try to use them first to increase familiarity with what `String` can do.