In general, the answer is no: OS X is using specific libraries to access the metadata of the files based on type. These are not stored in a common attribute manner in the filesystem, but are inherent to the data. For example, PNG and JPG files record their height and width differently and can store different types of metadata about the image. The OS is reading these files and extracting this information for the More Info section.
In specific, however, the answer is yes: you want an ID3 library for Ruby like taglib-ruby or ruby-taglib. See the question Ruby mp3 Id3 parsing for more information.