Class: Astrails::Safe::Local

Inherits:
Sink show all
Defined in:
lib/astrails/safe/local.rb

Instance Method Summary collapse

Methods inherited from Sink

#run

Methods inherited from Stream

#compressed?, #config, #filename, #id, #initialize

Constructor Details

This class inherits a constructor from Astrails::Safe::Stream

Instance Method Details

#open(&block) ⇒ Object



5
6
7
8
9
# File 'lib/astrails/safe/local.rb', line 5

def open(&block)
  return @parent.open(&block) unless active?
  run
  File.open(path, &block) unless $DRY_RUN
end