concept system in category ruby

This is an excerpt from Manning's book The Well-Grounded Rubyist, Third Edition.
Writing a Ruby program can involve thinking about how you might map elements of a domain (even a modest one-entity domain like “a ticket to an event”) onto a system of objects so that those objects can store information and perform tasks. At the same time, it’s important not to think too rigidly about the relation between objects and the real world. Object-oriented languages certainly offer a strong component of real-world modeling; but Ruby, at the same time, is extremely elastic in its modeling facilities—as you can see from how easy it is to enhance a given object’s behavior. The chief goal in designing a program and the objects inside it is to come up with a system that works and that has internal consistency.
You can issue system commands in several ways in Ruby. We’ll look primarily at two of them: the system method and the `` (backticks) technique. The other ways to communicate with system programs involve somewhat lower-level programming and are more system dependent and therefore somewhat outside the scope of this book. We’ll take a brief look at them nonetheless, and if they seem to be something you need, you can explore them further.
To use system, send it the name of the program you want to run, with any arguments. The program uses the current STDIN, STDOUT, and STDERR. Following are three simple examples. cat and grep require pressing Ctrl-D (or whatever the “end-of-file” key is on your system) to terminate them and return control to irb. For clarity, Ruby’s output is in bold and user input is in regular font:
>> system("date") Sun Apr 22 08:49:11 EDT 2018 => true >> system("cat") I'm typing on the screen for the cat command. I'm typing on the screen for the cat command. => true >> system('grep "D"') one two David DavidWhen you use system, the global variable $? is set to a Process::Status object that contains information about the call: specifically, the process ID of the process you just ran and its exit status. Here’s a call to date and one to grep, the latter terminated with Ctrl-D. Each is followed by examination of $?:
Using the open family of methods to call external programs is a lot more complex than using system and backticks. We’ll look at a few simple examples, but we won’t plumb the depths of the topic. These Ruby methods map directly to the underlying system-library calls that support them, and their exact behavior may vary from one system to another more than most Ruby behavior does.

This is an excerpt from Manning's book Rails 3 in Action.
To use this version of Ruby, you would need to use rvm use 1.9.2 every time you wished to use it or else set up a .rvmrc file in the root of your project, which is explained on the RVM site in great detail. Alternatively, you can set this version of Ruby as the default with the command rvm use --default 1.9.2, and use rvm use system if you ever want to swap back to the system-provided Ruby install if you have one.
Listing 7.11. features/hidden_links.feature
Feature: Hidden Links In order to clean up the user experience As the system I want to hide links from users who can't act on them Background: Given there are the following users: | email | password | admin | | user@ticketee.com | password | false | | admin@ticketee.com | password | true | And there is a project called "TextMate 2" Scenario: New project link is hidden for non-signed-in users Given I am on the homepage Then I should not see the "New Project" link Scenario: New project link is hidden for signed-in users Given I am signed in as "user@ticketee.com" Then I should not see the "New Project" link Scenario: New project link is shown to admins Given I am signed in as "admin@ticketee.com" Then I should see the "New Project" link
In this chapter, you’ll begin to send emails to your users. When a user signs up to Ticketee, they use their email address as a way for the system to uniquely identify them. You then verify that the address is valid by sending the user a confirmation email. With a user’s validated email address, you’re able to send them updates for important events in the system, such as a ticket being updated.