- Name what each of the below is:
a = 1 # => ex. a is a local variable, and is a Fixnum object with value 1
@a = 2 # => @a is instance vairiable, Fixnum object.
user = User.new # => local instance, is an User object.
user.name # => instance getter method
user.name = "Joe" # => instance setter method, set something to String object
- How does a class mixin a module?
- By inculde a module, and module provides the instance method for that instance object.
- What's the difference between class variables and instance variables?