I'm aware that I can use ethtool eth0|eth1|eth2 to check the existence of a NIC.
But I wonder where the files are on the machine that contain information of an existing interface, as I need to use the Ruby language to check for available NICs.

Call ethtool as an external process and parse its output. If you want information related to IP settings, call ifconfig in preference to ethtool, because ifconfig is always present whereas ethtool will be present only if the system administrator has installed it. An alternative to ifconfig is ip, but it's not always present and its output is only marginally easier to parse than ifconfig's, so use ifconfig if it provides the right output for you.