Ruby On Rails Classroom image

Anil  Bist / 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
Anil  Bist

Skills    Ruby On Rails

Qualifications :- High School - SLV, College/University - Graphic Era Deemed Univ University,
Location :-Dehradun,Dehradun,Uttarakhand,India
Description:-

I started my Professional Journey in 2006 with one of the Web Development Company in Bangalore and my 1st framework was "Ruby on Rail" as Web development and delivered around 5+ Projects using this platform. Then came another dimension as JEE/Sturst framework, Gradually I realized that I want to build something on my own and give my passion and energy on creating something different a
Explore

 

  Students (0)