module RsyncCron class Installer def initialize(content, shell) @content = content @shell = shell end def call return if @shell.empty? IO.popen(@shell, "r+") do |pipe| pipe.puts(@content) pipe.close_write end $?.exitstatus.zero? end end end