CSS Minifier Ruby Example

Check the example on how to use
Ruby
to minify a CSS hardcoded string and output to stdout:
require "rest_client"

response = RestClient.post "https://www.toptal.com/developers/cssminifier/api/raw", {:input => "p { color : red; }"}
puts(response)
Install the
rest-client
gem, save the code to a file named
minify.rb
and run the following command:
ruby minify.rb

Output:

p{color:red}