reference ruby class without module name

ruby

Solution

Modules can be mixed in to one another. To use BarModule as a mixin, you want to `include BarModule`.

Problem

Is there a way in ruby to load a module containing many classes and be able to access these classes without prefixing them with the module name? Consider foo.rb and bar.rb: foo.rb: ``` require 'bar' bar = BarModule::Bar.new() ``` bar.rb ``` module BarModule class Bar end end ``` Basically I'd like the ability, from foo.rb, to refer to the class "Bar" without specifying its module every time I reference it. In java terms, I'm looking for something akin to: ``` import BarModule.*; ``` Anything like that exist?

Original source