Add attr() method