$ irb
> class MyHash < Hash ; end
 => nil
> h = MyHash.new
 => {}
> h.is_a? Hash
 => true

Cheers,


Andy

-- 
Andy Jeffries
http://andyjeffries.co.uk/      #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840


On 9 July 2010 08:52, Hemant Bhargava <li...@ruby-forum.com> wrote:

> Hello All,
>
> I want to know that is there anything in ruby by which i can know that
> which kind of object is this..? Something like is_object? :)
>
> I mean.. lets suppose i have two objects of Model ABC and Model DEF..
> then i want to execute some conditions based upon the type of objects.
>
> Thanks in advance.
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to