Use #public_send for attribute assignment

Closes #646