class SiSU_Zap::Source

Public Class Methods

new(opt) click to toggle source
# File lib/sisu/zap.rb, line 59
def initialize(opt)
  @opt=opt
  @env=SiSU_Env::InfoEnv.new(opt.fns)
end

Public Instance Methods

read() click to toggle source
# File lib/sisu/zap.rb, line 63
def read
  zap_path="#{@env.path.output}/#{@env.fnb}"
  z=SiSU_Env::CleanOutput.new(@opt)
  if SiSU_Env::InfoSettings.new.permission?('zap')
    unless @opt.act[:quiet][:set]==:on
      tell=SiSU_Screen::Ansi.new(
        @opt.act[:color_state][:set],
        "Clean files related to processing #{@opt.selections.str} ->",
        "#{@opt.fns} -> #{zap_path}"
      )
      tell.warn
    end
    z.zap.remove_output
  else
    unless @opt.act[:quiet][:set]==:on
      tell=SiSU_Screen::Ansi.new(
        @opt.act[:color_state][:set],
        'use of -Z (zap) has not enabled in sisurc.yml'
      )
      tell.warn
    end
  end
end