June 2017
Beginner
330 pages
7h 30m
English
Let's start by taking a look at a program that manages a blog:
class Blog def edit_post puts "Post edited" end def delete_post puts "Post removed" end def create_post puts "Post created" endendblog = Blog.newblog.edit_postblog.delete_postblog.create_post
Obviously, this program simply prints out some values in each method. If we run the program, you'll see that this code works properly:
Post edited Post removed Post created
Read now
Unlock full access