Class: Niman::Library::File

Inherits:
Object
  • Object
show all
Defined in:
lib/niman/library/file.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



19
20
21
# File 'lib/niman/library/file.rb', line 19

def description
  "File #{path}"
end

#errorsObject



15
16
17
# File 'lib/niman/library/file.rb', line 15

def errors
  ['file path must not be nil and empty']
end

#valid?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/niman/library/file.rb', line 11

def valid?
  !self.path.nil? && !self.path.empty?
end