Ruby On Rails Classroom image

Neha  Jaggi / Professional / Web Technology

To post your Question Join Classroom
Lesson Topics's No:-  ||


This concludes our overview of the Ruby language. In Chapter 5, we’ll start putting it to good use in developing the sample application.
               We won’t be using the example_user.rb file from Section 4.4.5, so I suggest removing it:

$  rm  example  user.rb


Then commit the other changes to the main source code repository:

$  git  add .
$  git  commit  -m    "Add a full_title helper" 



1.   By replacing the question marks in Listing 4.10 with the appropriate methods, combine split, shuffle, and join to write a function that shuffles the letters in a given string.
2.   Using Listing 4.11 as a guide, add a shuffle method to the String class.
3.   Create three hashes called person1, person2, and person3, with first and last names underthe keys :first and :last.Then create a params hash so that params
      [:father] is person1, params[:mother] is person2, and params[:child] is person3. Verify that, for example, params[:father][:first] has the right value.
4.   Find an online version of the Ruby API and read about the Hash method merge.
5.   Find and follow the Ruby Koans to reach Ruby enlightenment. 


Listing 4.10 Skeleton for a string shuffle function.


Listing 4.11 Skeleton for a shuffle method attached to the String class.


Neha  Jaggi

Skills    Ruby On Rails

Qualifications :- High School - , College/University - Graphic Era Hill University, Dehradun, College/University - ,
Location :-Dehradun,Dehradun,UTTARAKHAND,India

Experienced Software Developer with a demonstrated history of working in the Information Technology and services industry. Skilled in Web Technologies (Ruby on Rails, PostgreSQL, php, Laravel and AJAX). 


  Students (0)