Class: Mantra::Transform::Input::FileInput

Inherits:
Mantra::Transform::Input show all
Defined in:
lib/mantra/transform/inputs/file.rb

Instance Method Summary collapse

Methods inherited from Mantra::Transform::Input

#required?, #validate, #validate_required

Methods included from Helpers::ObjectWithType

included

Instance Method Details

#validate_file_exists(value, name) ⇒ Object



7
8
9
10
11
# File 'lib/mantra/transform/inputs/file.rb', line 7

def validate_file_exists(value, name)
  unless File.exist?(value)
    raise ValidationError.new("File does not exist: #{value}")
  end
end