1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-14 10:45:06 +02:00

Merge pull request #127 from zaa/patch-1

An an example of an instance variable assignment
This commit is contained in:
Adam Bard
2013-07-17 10:23:48 -07:00

View File

@@ -305,6 +305,8 @@ dwight = Human.new("Dwight K. Schrute")
# Let's call a couple of methods # Let's call a couple of methods
jim.species #=> "H. sapiens" jim.species #=> "H. sapiens"
jim.name #=> "Jim Halpert" jim.name #=> "Jim Halpert"
jim.name = "Jim Halpert II" #=> "Jim Halpert II"
jim.name #=> "Jim Halpert II"
dwight.species #=> "H. sapiens" dwight.species #=> "H. sapiens"
dwight.name #=> "Dwight K. Schrute" dwight.name #=> "Dwight K. Schrute"