Hash attributes caster in declarative way