```Ruby
def yield_name(name)
puts "In the method! Let's yield."
yield("Kim")
puts "In between the yields!"
yield(name)
puts "Block complete! Back in the method."
end
yield_name("Eric") { |n| puts "My name is #{n}." }
```
输出结果：
In the method! Let's yield.
My name is Kim.
In between the yields!
My name is Eric.
Block complete! Back in the method.

a lambda checks the number of arguments passed to it, while a proc does not. This means that a lambda will throw an error if you pass it the wrong number of arguments, whereas a proc will ignore unexpected arguments and assign nil to any that are missing.

when a lambda returns, it passes control back to the calling method; when a proc returns, it does so immediately, without going back to the calling method.**

Object-Oriented Programming

class : a way of organizing and producing objects with similar attributes and methods.

@var : an instance variable, means the var is attached to the instance of the class.

Scope : The scope of a variable is the context in which it’s visible to the program.