learning about using modules to structure an application....
Let's say I have
module SomeApp
class App < Sinatra::Base
#stuff
end
end
#other file
module SomeApp
module Helpers
def some_helper
end
end
end
I'm having issues accessing SomeApp::Helpers inside SomeApp::App
there's a function called helpers that accepts a module to use as helpers for sinatra
So I need to pass it the Helpers module during initializing
However despite my best efforts, I can never seem to access the module properly.
I believe using Helpers inside SomeApp::App tries to access SomeApp::App::Helpers, when it should be SomeApp::Helpers? So I tried SomeApp::Helpers, but again, it didn't seem to be the correct module.
@Cereal I don't have time right now to look at it, but this might be helpful. cirw.in/blog/constant-lookup . The text starting with "If you've ever tried to take a short-cut when re-opening a module..." may not may not be apropos.
@Benny33 It's good its good and bad points. A lot of what's good about Ruby doesn't get good until you are doing some other things, some practices that don't come with the language. I hear you on static typing, though. It can be nice.