What is Ditto and how do you get it in ruby?

Ditto is a pink gum like thing that has no gender and will allow any Pokemon to breed with it except legendaries that's because ditto can transform to any and every Pokemon! Ditto however is uncatchable in ruby either get one from emerald or firered and leafgreen.