diff --git a/ruby.md b/ruby.md index 9cec8e3f..947f5243 100644 --- a/ruby.md +++ b/ruby.md @@ -558,6 +558,9 @@ dwight.name #=> "Dwight K. Schrute" # Calling of a class method Human.say('Hi') #=> "Hi" +# Tip: Use .inspect to see instance with instance variables +puts jim.inspect #=> # + # Variable's scopes are defined by the way we name them. # Variables that start with $ have global scope. $var = "I'm a global var"