Flowdock
method

make_tmpname

Importance_0
v2_1_10 - 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 108
    def make_tmpname(prefix_suffix, n)
      case prefix_suffix
      when String
        prefix = prefix_suffix
        suffix = ""
      when Array
        prefix = prefix_suffix[0]
        suffix = prefix_suffix[1]
      else
        raise ArgumentError, "unexpected prefix_suffix: #{prefix_suffix.inspect}"
      end
      t = Time.now.strftime("%Y%m%d")
      path = "#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}"
      path << "-#{n}" if n
      path << suffix
    end
Register or log in to add new notes.