A Ruby class that automatically includes every method and constant from all loaded modules and classes.
Base is a Ruby class that acts as a universal base class by automatically including every method and constant from all loaded modules and classes in the system. It solves the problem of needing to explicitly import or include modules by providing immediate access to all available functionality, enabling rapid and unconventional coding patterns.
Ruby developers interested in metaprogramming, experimental coding, or humor-driven projects, particularly those exploring extreme convenience or prototyping scenarios.
Developers choose Base for its unparalleled convenience in accessing any method or constant without imports, its humorous and bold approach to Ruby design, and its utility in rapid prototyping or code golf challenges.
The universal Base class you've always wanted.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Subclasses can call any method from loaded modules like Base64.encode64 or Zlib.deflate without explicit includes, as shown in the Cantaloupe example where embiggen uses encode64 and deflate directly.
Directly reference constants such as File::SEPARATOR without namespace prefixes, simplifying code and reducing boilerplate.
In a Rails app, Base instances have over 5,700 methods available, far exceeding typical base classes like ActiveRecord::Base with only 572 methods, enabling extreme experimentation.
Simply subclass Base to inherit all functionality automatically, with no additional imports or configuration required, as demonstrated in the README.
Automatically including every method from all loaded modules leads to inevitable method name conflicts and unpredictable behavior, making debugging and maintenance difficult.
The README notes it takes five seconds just to count methods in a Rails app, indicating severe performance degradation in method lookup and class initialization.
The project is presented with a humorous tone, and the license involves rolling a die for conflicts, suggesting it's not intended for production use and lacks reliable support or versioning.