Class: Anvil::FileAssure

Inherits:
Assure
  • Object
show all
Defined in:
lib/anvil/assures/file_assure.rb

Overview

Make sure that a file exists before running the task

Direct Known Subclasses

DirectoryAssure

Instance Method Summary collapse

Methods inherited from Assure

from_name

Instance Method Details

#assure_exists?(file) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/anvil/assures/file_assure.rb', line 10

def assure_exists?(file)
  File.exists? file
end

#assured?(file) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/anvil/assures/file_assure.rb', line 6

def assured?(file)
  assure_exists? file
end