Ruby: module A vs class A::B -
so, can have (a):
module class b end end and can have (b):
class a::b end why use a instead of b , vice versa?
when defining second option saves indentation , more compact, useful when want write a::b first time, have take first option. otherwise,a::b concisely , independent of other things in a.
Comments
Post a Comment