Class and Module can not be of same name
class Test
end
</pre></code>
module with same name
module Test
end
</pre></code>
it will throw error => "Test ia not a module"
module Test
end
</pre></code>
class with same name
class Test
end
</pre></code>
it will throw error => "Test ia not a class"
Written by Rashmi
Related protips
1 Response
I'd like to know how to put methods in class so it behaves as module as fat as we talk about "include" behavior :)
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#