Exception: PathAssay

Inherits:
Assertion show all
Defined in:
lib/assay/path_assay.rb

Overview

Assert the existance of a file with ‘File.file?` call.

Direct Known Subclasses

DirectoryAssay, FileAssay

Constant Summary

Constants inherited from Assertion

Assertion::SIZE_LIMIT

Constants included from Assay::Assertable

Assay::Assertable::SIZE_LIMIT

Class Method Summary collapse

Methods inherited from Assertion

by_name, by_operator, inherited, register, subclasses

Methods included from Assay::Assertable

#[], #assert!, #assert_message, #assertive_name, #assertor, #fail?, #operator, #pass?, #refute!, #refute_message

Class Method Details

.pass?(path) ⇒ Boolean

Check assertion using ‘File.exist?` method.

Returns:

  • (Boolean)


12
13
14
# File 'lib/assay/path_assay.rb', line 12

def self.pass?(path)
  File.exist?(path)
end