concept line in category ruby

This is an excerpt from Manning's book The Well-Grounded Rubyist, Third Edition.
As you’ll see once you dive in, Ruby keeps even file and I/O operations object oriented. This is great for consistency—as your programs grow and begin interacting with other systems, you can fall back on your “(very nearly) everything is an object” understanding of Ruby and apply it to the utilities described in this chapter. Input and output streams, like the standard input stream or, for that matter, any file handle, are objects. Some I/O-related commands are more procedural: puts, for example, or the system method that lets you execute a system command. But puts is only procedural when it’s operating on the standard output stream. When you puts a line to a file, you explicitly send the message “puts” to a File object.
If you want to get the entire file at once as an array of lines, use readlines (a close relative of read). Note also the rewind operation, which moves the File object’s internal position pointer back to the beginning of the file:
>> f.rewind => 0 >> f.readlines => ["class Ticket\n", " def initialize(venue, date)\n", " @venue = venue\n", " @date = date\n" etc.Keep in mind that File objects are enumerable. That means you can iterate through the lines one at a time rather than reading the whole file into memory. The each method of File objects (also known by the synonym each_line) serves this purpose:

This is an excerpt from Manning's book Rails 3 in Action.
What you see here is known as a scenario in Cucumber. Under the scenario’s title, the remainder of the lines are called steps, which are read by Cucumber’s parser and matched to step definitions, where the logic is kept. Scenarios are found inside a feature, which is a collection of common scenarios. For example, you may have one feature for dictating what happens when a user creates projects and another for when a user creates tickets.
Notice the keywords Given, And, When, and Then. These are just some of the keywords that Cucumber looks for to indicate that a line is a step. If you’re going to be using the same keyword on a new line, it’s best practice to instead use the And keyword because it reads better. Try reading the first two lines aloud from the previous listing, then replace the And with Given and try it again. It just sounds right to have an And there rather than a Given.
Showing /[path to ticketee]/app/views/projects/index.html.erb where line #5 raised: You have a nil object when you didn't expect it! You might have expected an instance of Array.
Let’s add these states to your db/seeds.rb file by using the lines shown in the following listing.