Method: Balloon::FileExtension#path

Defined in:
lib/balloon/file_extension.rb

#pathString

Get real path with uploaded file

Returns:

  • (String)

    file path



61
62
63
64
65
66
67
68
69
70
# File 'lib/balloon/file_extension.rb', line 61

def path
  return "" if @file.blank?
  if @file.is_a?(String) || @file.is_a?(Pathname)
    File.expand_path(@file)
  elsif @file.respond_to?(:path)
    File.expand_path(@file.path)
  else
    ""
  end
end