Could anyone please help me to understand the difference between "yield self" and "yield"?
class YieldFirstLast
attr_accessor :first, :last
def initialize(first = nil, last = nil)
@first = first
@last = last
yield self if block_given?
end
def hello
puts "#{@first} #{@last} says hello!"
end
end