He runs in the background, without being seen
gem install ninja
require "ninja/threaded" # Use a thread pool to run the background jobs Ninja.hide_in(Ninja::Threaded.new(4)) class FooBar include Ninja def my_method # some code in_background do # this code will run in background end # mode code end end