On 10.01.2009 04:14, Avdi Grimm wrote:
> On Fri, Jan 9, 2009 at 9:49 PM, r <rt8396 / gmail.com> wrote:
>> 2.) help(obj) -> <no brainer>
> 
> Doesn't exist.  Ruby does not have documentation metadata attached to objects.

Although it can be added easily

irb(main):001:0> class Module
irb(main):002:1> def doc(s=nil) s ? @doc = s : @doc end
irb(main):003:1> end
=> nil
irb(main):004:0> class Object
irb(main):005:1> def help; self.class.doc; end
irb(main):006:1> end
=> nil
irb(main):007:0> class Foo
irb(main):008:1> doc "silly example"
irb(main):009:1> end
=> "silly example"
irb(main):010:0> f = Foo.new
=> #<Foo:0x7ff740e8>
irb(main):011:0> f.help
=> "silly example"
irb(main):012:0>

>> 5.) id(obj)
> 
> obj.id

Note that #id is deprecated, rather use obj.object_id.

Kind regards

	robert

-- 
remember.guy do |as, often| as.you_can - without end