Sha256: 4547d13aad61acfbc06f4c07dfb7d03dab4454a11e54737914b5e046010728d9

Contents?: true

Size: 251 Bytes

Versions: 11

Compression:

Stored size: 251 Bytes

Contents

module Kernel

  # Returns the object id as a string in hexideciaml,
  # which is how Ruby reports them with inspect.
  #
  #   "ABC".object_hexid  #=> "0x402d359c"

  def object_hexid
    return "0x" << ('%.x' % (2*self.__id__))  #[1..-1]
  end

end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
facets-2.7.0 lib/core/facets/kernel/object_hexid.rb
facets-2.6.0 lib/core/facets/kernel/object_hexid.rb
facets-2.4.1 lib/facets/kernel/object_hexid.rb
facets-2.4.3 lib/core/facets/kernel/object_hexid.rb
facets-2.4.2 lib/core/facets/kernel/object_hexid.rb
facets-2.4.4 lib/core/facets/kernel/object_hexid.rb
facets-2.4.5 lib/core/facets/kernel/object_hexid.rb
facets-2.5.0 lib/core/facets/kernel/object_hexid.rb
facets-2.5.1 lib/core/facets/kernel/object_hexid.rb
facets-2.5.2 lib/core/facets/kernel/object_hexid.rb
mack-facets-0.8.2 lib/gems/facets-2.4.5/lib/core/facets/kernel/object_hexid.rb