Join Kevin Skoglund for an in-depth discussion in this video Challenge: List maker, part of Ruby: Files, Formats, Templates.
(upbeat music)…- [Instructor] It's time for a challenge assignment.…In this challenge, I want you to try and build…a list maker program.…It's going to be an interactive command line program…to allow users to manage a list that's saved in a file.…So, it's going to find the list file if it already exists…and if not, it's going to create a new file.…The user can view the current list…which means that you would need to read back the items…that are stored in the file.…The user can also add new items to the end of the list.…
And the user can edit any item in the list.…Now you won't have to create this from scratch.…In the exercise files I've given you some code…to start you out.…In the exercise files you'll find a folder called…list_maker.…If you take a look you'll see there's a init.rb file,…a lib file that has two classes in here that…we're going to work with.…So the first is init.rb.…It's pretty simple.…It has our shebang line at the top…and then it's going to figure out what the app root is.…Notice that I'm using expand path and dirname…
- File system basics
- Writing to and reading from files
- Renaming, deleting, and copying files
- Creating and editing directories
- Working with common data formats
- ERB templating
Skill Level Beginner
Ruby on Rails 5 Essential Trainingwith Kevin Skoglund10h 21m Beginner
1. The File System
2. Work with Files
3. Work with Directories
4. Common Data Formats
5. ERB Templating
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.