Is there a built in way to convert an integer in Ruby into its hexadecimal equivalent?

Something like the opposite of [`String#to_i`](http://ruby-doc.org/core-2.0.0/String.html#method-i-to_i):

```
"0A".to_i(16) #=>10

```

Like perhaps:

```
"0A".hex #=>10

```

I know how to roll my own, but it's probably more efficient to use a built in Ruby function.