Files | Admin

Notes:

Release Name: 0.2.1

Notes:
= Hexoid v0.2

<b>Generate Ruby style object ids</b>

The default <tt>to_s</tt> method for Ruby objects includes the object id encoded as a hexadecimal: <tt>#<Object:0x000001009e60f8></tt>. When you add a <tt>to_s</tt> method to your own objects, you lose that hexadecimal value. Hexoid gives it back.

== Usage

    require 'hexoid'

    class A
      def to_s
        "<A:%s>" % self.hexoid
      end
    end
    
    obj = A.new
    puts obj            # => "<A:0x10103a380>"
    puts obj.hexoid     # => "0x10103a380"
    
== Installation

Get it in one of the following ways:

* <tt>gem install hexoid</tt>
* <tt>git clone git://github.com/delano/hexoid.git</tt>
* <tt>gem install delano-hexoid --source http://gems.github.com</tt>


== Known Issues

* Does not work in JRuby 


== More Information

* Codes[http://github.com/delano/hexoid]
* RDocs[http://delano.github.com/hexoid]
* Story[http://solutious.com/blog/2009/09/22/secret-of-object-to_s/]

== Credits

* Delano Mandelbaum (http://solutious.com)

== License

See LICENSE.txt



Changes: HEXOID, CHANGES #### 0.2.1 (2009-09-22) ############################### * Use the absolute value of the object id. #### 0.2.0 (2009-09-21) ############################### * Initial public release