addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrosseditemptyheartfacebookfolderfullheartglobegmailgoogleimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

Atlanta Ruby Meetup Group Message Board › ruby equivalent to java or c#'s "this" reference?

ruby equivalent to java or c#'s "this" reference?

A former member
Post #: 1
what is the ruby equivalent to java or c#'s "this" reference? I am new to ruby and I after a few hours of searching I still don't know the answer. Does anybody know? It could be embarassingly simple but ....

Thanks!
A former member
Post #: 2
Never mind. It is "self". Another question though: if I know the name of a model class, how do I get to that object list. For example,
classname = "Member"

how do I get to the @members at run time?
Calvin Y.
sourcebender
Atlanta, GA
Post #: 2
You'll probably have to get to the object to find it:

Object.new.instance_variables

Take a look at the Object docs for more details:

http://www.ruby-doc.o...­
A former member
Post #: 3
Thank you Calvin. Looks like the function I want is in the Class class.
Powered by mvnForum

Our Sponsors

  • Mandrill

    Sponsors food, meeting space, and other expenses.

  • Pardot

    Sponsors food, meeting space, and other expenses.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy