From 5267bff2cf778e615e6f2dec48bafaec00976b1a Mon Sep 17 00:00:00 2001 From: Alexander Zhuravlev Date: Wed, 17 Jul 2013 05:22:32 +0400 Subject: An an example of an instance variable assignment --- ruby.html.markdown | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ruby.html.markdown') diff --git a/ruby.html.markdown b/ruby.html.markdown index af7af918..38d060a3 100644 --- a/ruby.html.markdown +++ b/ruby.html.markdown @@ -305,6 +305,8 @@ dwight = Human.new("Dwight K. Schrute") # Let's call a couple of methods jim.species #=> "H. sapiens" jim.name #=> "Jim Halpert" +jim.name = "Jim Halpert II" #=> "Jim Halpert II" +jim.name #=> "Jim Halpert II" dwight.species #=> "H. sapiens" dwight.name #=> "Dwight K. Schrute" -- cgit v1.2.3