Class: BacklogReporter::FlagFile

Inherits:
Object
  • Object
show all
Defined in:
lib/backlog_reporter.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ FlagFile

Returns a new instance of FlagFile.



64
65
66
67
68
# File 'lib/backlog_reporter.rb', line 64

def initialize path
  @path = path
  @exists = File.exists? path
  set false
end

Instance Method Details

#set(value) ⇒ Object



70
71
72
73
74
75
# File 'lib/backlog_reporter.rb', line 70

def set value
  if @exists != value
    FileUtils.send((value ? :touch : :rm_f), @path)
    @exists = value
  end
end