class Chop::Form::MultipleFile

Public Instance Methods

fill_in!() click to toggle source
# File lib/chop/form.rb, line 205
def fill_in!
  field.set file_paths
end
matches?() click to toggle source
# File lib/chop/form.rb, line 201
def matches?
  field[:type] == "file" && field[:multiple]
end

Private Instance Methods

file_paths() click to toggle source
# File lib/chop/form.rb, line 211
def file_paths
  value.split(" ").map do |filename|
    ::File.expand_path(::File.join(path, filename)).tap do |path|
      ::File.open(path){} # raise Errno::ENOENT if file doesn't exist
    end
  end
end