Module: FlightConfig::Deleter

Defined in:
lib/flight_config/deleter.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.delete_error_if_missing(config) ⇒ Object

Raises:



36
37
38
39
40
41
# File 'lib/flight_config/deleter.rb', line 36

def self.delete_error_if_missing(config)
  return if File.exist?(config.path)
  raise MissingFile, <<~ERROR.chomp
    Delete failed! The config does not exist: #{config.path}
  ERROR
end

.included(base) ⇒ Object



32
33
34
# File 'lib/flight_config/deleter.rb', line 32

def self.included(base)
  base.extend(ClassMethods)
end