Note to Self about Modules in Ruby
Published on 24 Dec 2016
by Alexander Garber
Make sure to include the name of the module in the method:
Everything else is rather straightforward, but for some reason I keep on missing that detail. I'll just keep on drilling it until it sinks in.
In other words, I'll keep on crashing until I learn how to fly this damn aeroplane :)
module GameDictionary
def GameDictionary.scene_enter()
puts "This scene is not yet configured. Subclass it and implement enter()."
exit(1)
end
Everything else is rather straightforward, but for some reason I keep on missing that detail. I'll just keep on drilling it until it sinks in.
In other words, I'll keep on crashing until I learn how to fly this damn aeroplane :)
all tags
activerecord android annoyances api apt arch array artix atom az3w backend bash blog browser bug callback career cli cloud code coding config configuration cp crud css database db design devops django email erp filter fugitive gif gist git gnome grep hebrew http ide isbn-fetcher iso javascript job search js kanban kanban\ kindle koans linux logger manjaro map markdown microservices mobi mtp neovim nodejs packages pastbin patch post python rails reduce refactoring rest routes rspec ruby scripting security sed shell sql string_replacement study tdd terminal testing version_control vim walkthrough workflow