I'm considering writing a (large) desktop application in Ruby (actually a game, think of something like Angband or Nethack using Gtk + for the GUI). I come from C # / background. NET, so I got a little lost on how to structure things.
In C #, I would create many namespaces such as Application.Core, Application.Gui, etc.). Parts of the application that did not need Gui would not reference it using the instructions. From what I understand, in Ruby, the require expression basically does a text insertion that avoids code duplication. What bothers me, with require requests, each file / class will have access to everything else, because the ordering of the required statements is.
I read some ruby code that uses modules as namespaces. How does it work and how does it help?
Not sure what I'm doing here ... Does anyone have any good recommendations on how to structure a large Ruby application? What about some non-trivial (and non-Rails) applications that use Ruby?
source
share