RubyFlow The Ruby and Rails community linklog

Avoid these traps when nesting Ruby modules

But buried within Ruby’s nesting implementation - and Rails’ autoload system - are a few traps that can cause your code to fail in strange and wonderful ways. In this post, we’ll discuss the origin of these traps and how you can avoid them. http://blog.honeybadger.io/avoid-these-traps-when-nesting-ruby-modules/

Comments

The common problem is that people misunderstand expressions like “module ConstA::ConstB”. It doesn’t define any inheritance, but rather allows code the access to a specific constant (module).

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in