Why you should nest modules in Ruby
18-May-2024 506
Subtle gotchas with inline classes and modulesThe difference is often described as stylistic, but there are a couple of functional differences between the two approaches that you should be aware of before choosing one over the other.To illustrate, imagine an app with User and Admin::User classes. Depending on how you reference those, you’ll get two different results:.
Why you should nest modules in Ruby #ruby #rubydeveloper #rubyonrails #should #modules https://rubyonrails.ba/link/why-you-should-nest-modules-in-ruby