Flowdock
method

make_tmpname

Importance_0
v2_4_6 - Show latest stable - 0 notes - Class: Tmpname
make_tmpname((prefix, suffix), n) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/tmpdir.rb, line 115
    def make_tmpname((prefix, suffix), n)
      prefix = (String.try_convert(prefix) or
                raise ArgumentError, "unexpected prefix: #{prefix.inspect}")
      prefix = prefix.delete("#{File::SEPARATOR}#{File::ALT_SEPARATOR}")
      suffix &&= (String.try_convert(suffix) or
                  raise ArgumentError, "unexpected suffix: #{suffix.inspect}")
      suffix &&= suffix.delete("#{File::SEPARATOR}#{File::ALT_SEPARATOR}")
      t = Time.now.strftime("%Y%m%d")
      path = "#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}".dup
      path << "-#{n}" if n
      path << suffix if suffix
      path
    end
Register or log in to add new notes.