optimised the HashSerialization#attribute_methods