Join Kevin Skoglund for an in-depth discussion in this video Application paths, part of Ruby Essential Training.
- View Offline
- Exercise Files
Most times when you are starting a new Ruby application, one of the first things…you want to do is establish your application paths.…Essentially you are telling your application, figure out where you were located…inside the file system at this point in time, and then we will be able to use…that path as a basis for any relative paths that need to load in other files,…either for requiring them or for reading and writing to them.…Inside my food_finder project folder I've gone ahead and added a couple of things.…I have got my lib folder,…which is my library for different classes of objects.…and I've got a starting class here, guide.rb, which is empty.…
There is absolutely nothing in there.…It's just a placeholder file for now.…And then I have got in init.rb. init is short for initialize and init.rb is…sort of a Ruby convention that this is the starting point of our application.…This is what we will use to launch it.…Now you don't have to follow that convention if you don't want. You can call…this food_finder.rb, or you can call it launch.rb.…
- Using Ruby in the Interactive Ruby Shell and in standalone scripts
- Learning to write custom code blocks to find, merge, and sort
- Using modules for namespacing or as mix-ins
- Reading from and writing to files
- Creating a full Ruby project from start to finish
Skill Level Beginner
1. Getting Started with Ruby
2. Ruby Object Types
3. Control Structures
4. Code Blocks
8. Working with Files
9. Ruby Project: Creating the Food Finder
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.