You can see what is happening if you check the file on your file system.
In a Posix environment, you can check the file with the file command:
$: file bundler-1.3.0.gem
bundler-1.3.0.gem: POSIX tar archive
As you can see it is a tar archive. So it is a binary file, packaged and managed by the gem
tool.
It is 'binary' so you will not see it as you may have expected.
You are correct though, and you can continue to think that it contains packaged ruby 'functions'.
Everything that you have told it to contain through your gemspec (however you included it) is there.
As far as how Rails uses the gemfile, it is used generally by installing the gem to your system, how ever that is done is partially dependent on your environment decisions.