From: Gordon Thiesfeld Date: 2006-04-29T00:15:46+09:00 Subject: Re: class returns value without method or attribute >If I have a class how do I get it to return a value without specifying a >method or attribute: > You want to overload the inspect method: class Money attr_accessor :value def initialize(value) @value = value end def inspect @value end end irb(main):001:0> require 'money' => true irb(main):002:0> money = Money.new(5) => 5 irb(main):003:0> money => 5