Nested Modules
Posted by: Bob Ngu on: March 8, 2007
My RoR efforts have culminated in JiggyMe, check it out!
An example of nested modules,
“moduletest.rb”
To get to report method in module J, module N has to be included first
If module N is not included first, you will get an error like this
March 9, 2007 at 3:39 am
hmm, tried the following snippet on Try Ruby (http://tryruby.hobix.com).
class C
include N::J
end
a = C.new
a.report #prints “report” of j
I typed in the contents of
moduletest.rbfirst.