谁能帮我理解“屈服自我”和“屈服”之间的区别?
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