Ruby On Rails Classroom image

Neeraj  Amoli / Professional / Web Technology

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

 Conclusion


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" 

 

 Exercises


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.

 

 
 
 
image
Neeraj  Amoli

Skills    Ruby On Rails

Qualifications :-
Location :-Dehradun,Dehradun,Uttrakhand,India
Description:-

I have 3 year experience as a Software Engineer. My Skilled are Android Development (Java), ROR Development .   


Explore
 

  Students (0)