Sha256: fd4796c49bcea970f1cb32ccbf95e7d72b38427cd852f2e7a20f45af95cc696d

Contents?: true

Size: 299 Bytes

Versions: 1

Compression:

Stored size: 299 Bytes

Contents

require 'all_your_base/are/belong_to_us'

module BSON
  class ObjectID
    # Translate ObjectID instances to a more human-friendly format.
    # The reverse operation is String#to_oid.
    # Requires the all-your-base gem.
    def to_display
      to_s.reverse.to_i(16).to_base_62
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
junk_drawer-0.0.1 lib/core_extensions/object_id.rb