Diaspora* is a standalone social network server application and it is not designed to be a module in another application. Even though the license allows it, it would be very difficult to modify it to be a part of a larger application.
It however is very possible to just use the federation protocol that Diaspora* implements and integrate your application to the whole Diaspora* network, without using any of the original code. You only need to know how Diaspora* pods talk to each other.
If you want to implement social media functionality into an existing Ruby application, you are better off choosing some social media framework, not Diaspora*. See this question for some example projects.