Class: Refile::RandomHasher

Inherits:
Object
  • Object
show all
Defined in:
lib/refile/random_hasher.rb

Overview

A file hasher which ignores the file contents and always returns a random string.

Instance Method Summary collapse

Instance Method Details

#hash(_uploadable = nil) ⇒ String

Generate a random string

Returns:

  • (String)


7
8
9
# File 'lib/refile/random_hasher.rb', line 7

def hash(_uploadable = nil)
  SecureRandom.hex(30)
end