number in hash key

How do I retrieve the valye if my hash key is a number.

example: record from activerecord query

#<Mutation:0x33cefbc @attributes={"2003"=>"0.00", "2004"=>"7281.62",
"week"=>"01", "2005"=>"11847.90", "2006"=>"17813.10",
"2007"=>"27772.45"}>

This is storied in variable "p".

What I want to do is to get the value for p.2007 but ofcourse this
does not work. I tried p.'2007' but that also does not work.

am I trying to do something impossible ?

The problem is that 2007 and '2007' are not valid method names.

Try p.attributes["2007"] or p["2007"].

Chris