You can say \mintinline{ruby}{x = Class.new}, for example.