[LRUG] Talk topics (Luke Morton)

Carlos Alonso info at mrcalonso.com
Mon Jun 15 01:56:40 PDT 2015


+1 for 1.

And on that same topic I have a question:

Basically, what's the difference between this code:

module A
  class B
  end
end

and

class A::B

end

I've spotted the difference that the second class could not access any
constant defined within module A, but what's the point of that second
syntax? When is it recommended over the above one?

Cheers!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20150615/b86c10fc/attachment.html>


More information about the Chat mailing list