require 'pathname' module Certflare class Initialization def initialize @log_dir = Pathname.new('/var').join('log', 'certflare') @tmp_dir = Pathname.new('/tmp').join('certflare') end def create_tmp_dir unless @tmp_dir.exist? FileUtils.mkdir_p(Pathname.new('/tmp/').join('certflare')) end end def create_log_dir unless @log_dir.exist? FileUtils.mkdir_p(Pathname.new('/var').join('log', 'certflare')) end end end end