Sha256: c5824aede0ccc863cf39c9a882e18ea7a3373a4c1f30a06fe44506858f7edb2f

Contents?: true

Size: 254 Bytes

Versions: 21

Compression:

Stored size: 254 Bytes

Contents

module Fiona7
  class BlobIdGenerator
    def initialize(obj_id, time=nil)
      @obj_id = obj_id.to_i
      @time   = time || Time.now
      @stamp  = @time.to_i.to_s(16)
    end

    def call
      ("%022d" % @obj_id) + "bb" + @stamp
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
infopark_fiona7-1.6.1.1.5 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.6.1.1.1 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.6.1.1.0 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.2.0.2.3 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.2.0.2.1 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.2.0.2.2 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.5.5.5.1 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.5.5.5.0 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.2.0.1.4 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.5.5.4.1 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.5.5.4.0 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.2.0.1.3 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.5.5.3.1 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.5.4.3.0 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.5.3.2.0 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.5.3.2.0.pre.beta1 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.5.2.1.0.pre.beta1 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.5.2.0.0 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.2.0.1.1 lib/fiona7/blob_id_generator.rb
infopark_fiona7-1.2.0.0.1 lib/fiona7/blob_id_generator.rb