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
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
Hey Frank !
Check out the “Module” class here I believe:
http://www.ruby-doc.org/core/
Dylan
Thanks Dylan for the resource. I will check it out now.
Frank
Dylan S. [email protected] wrote: Hey Frank !
Check out the “Module” class here I believe:
http://www.ruby-doc.org/core/
Dylan
On 1/31/06, softwareengineer 99 <[email protected] >
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
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
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
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs