module Peregrine::Features::Identifiable

Provides the id method to extract an object’s object_id as a hex string. Intended to be included in classes requiring this functionality.

Public Instance Methods

id() click to toggle source

Returns the object’s object_id as a hexadecimal string.

# File lib/peregrine/features/identifiable.rb, line 7
def id
  '0x' << (object_id << 1).to_s(16)
end