# Viewing all Properties and Methods?

**URL:** <https://www.ruby-forum.com/t/viewing-all-properties-and-methods/99657>\
**Category:** Rails\
**Created:** [February 1, 2006, 6:44am UTC](https://www.ruby-forum.com/t/viewing-all-properties-and-methods/99657 "2006-02-01T06:44:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [February 1, 2006, 6:44am UTC](https://www.ruby-forum.com/t/viewing-all-properties-and-methods/99657/1 "2006-02-01T06:44:51Z")

</div>

Hello,

How can I see all the properties (member variables) and methods  
(functions) that are available for an object? Is there a function  
similar to PHP’s var\_dump in MySQL?

Many thanks for your assistance.

Frank

---

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [February 1, 2006, 8:36am UTC](https://www.ruby-forum.com/t/viewing-all-properties-and-methods/99657/2 "2006-02-01T08:36:36Z")

</div>

Hey Frank !

Check out the “Module” class here I believe:  
[http://www.ruby-doc.org/core/](http://www.ruby-doc.org/core/)

# Object, Module and Class all have a slew of “reflection” type methods… but am not sure which one prints “it all out”. Have a look and you’ll probably find it.

Dylan

---

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [February 1, 2006, 9:00am UTC](https://www.ruby-forum.com/t/viewing-all-properties-and-methods/99657/3 "2006-02-01T09:00:38Z")

</div>

Thanks Dylan for the resource. I will check it out now.

Frank

Dylan S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote: Hey Frank !

Check out the “Module” class here I believe:  
[http://www.ruby-doc.org/core/](http://www.ruby-doc.org/core/)

# Object, Module and Class all have a slew of “reflection” type methods… but am not sure which one prints “it all out”. Have a look and you’ll probably find it.

Dylan

On 1/31/06, softwareengineer 99 \<removed\_email\_address@domain.invalid \>  
wrote:Hello,

How can I see all the properties (member variables) and methods  
(functions) that are available for an object? Is there a function  
similar to PHP’s var\_dump in MySQL?

Many thanks for your assistance.

Frank

* * *

What are the most popular cars? Find out at Yahoo! Autos

* * *

Rails mailing list  
removed\_email\_address@domain.invalid  
[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

* * *

Rails mailing list  
removed\_email\_address@domain.invalid  
[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

---

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [February 1, 2006, 10:52am UTC](https://www.ruby-forum.com/t/viewing-all-properties-and-methods/99657/4 "2006-02-01T10:52:44Z")

</div>

> How can I see all the properties (member variables) and methods  
> (functions) that are available for an object? Is there a function  
> similar to PHP’s var\_dump in MySQL?

You can use the ‘methods’ and ‘instance\_variables’ methods. 🙂

obj.methods  
obj.instance\_variables

Or in a view \<%= debug(obj) %\> will give you a nicely formatted YAML  
style representation of the object.

–Nicky

---

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [February 1, 2006, 1:49pm UTC](https://www.ruby-forum.com/t/viewing-all-properties-and-methods/99657/5 "2006-02-01T13:49:52Z")

</div>

softwareengineer 99 wrote:

> Hello,
> 
> How can I see all the properties (member variables) and methods  
> (functions) that are available for an object? Is there a function  
> similar to PHP’s var\_dump in MySQL?  
> object.inspect is probably what you’re after.
