I'm new to ruby so I apologize for the noob question and thanks for the help. in ruby lets say I have a module like this:
module foo
a = 1
b = 2
end
else in the code I have an object bar with a variable foo_id attached to it.
is there an easy way to get 'a' or 'b' from the foo_id off the object bar? for example, doing something like this:
foo.get(bar.foo_id) #--> returning 'a'
The only idea that really comes to mind for me is making a get method in the module, is there a smarter ruby way of doing this? Thanks!