How to handle postman pre request script in our ruby code

i wanted to make a call to API using ruby code ,for this its need pre request script how can i handle or make use in my code