Class: Gesund::Checks::File

Inherits:
Object
  • Object
show all
Includes:
Gesund::Check
Defined in:
lib/gesund/checks/file.rb

Instance Attribute Summary

Attributes included from Gesund::Check

#message, #success

Instance Method Summary collapse

Methods included from Gesund::Check

#call, #fail, #pass

Constructor Details

#initialize(filename) ⇒ File

Returns a new instance of File.



4
5
6
7
# File 'lib/gesund/checks/file.rb', line 4

def initialize(filename)
  self.success = ::File.file? filename
  self.message = "File #{filename} is#{@success ? '' : ' not'} a file"
end