extracting #replace to HashExtensions
[ref] extracting PrettyInspect and ClassMethods