moved class method to attribute_spec
freeze hash