Encryption Modulus and Exponent

Is there a way to get the modulus and exponent from an key, or is there
a way to get that information as it is being encrypted? I am using the
OpenSSL::PKey::RSA library to encrypt my data. Thanks,

-S