Generate OAuth2.0 Authorization code using ruby

Hi Guys,

How to generate OAuth2.0 authentication authorization code using ruby code or any ruby gem ?.

Any help would be appreciated.