谁给解析下下面代码里面两个 yield 的原理
# home.html.erb
<% provide(:title, 'Home') %>
<h1>Sample App</h1>
<p>
This is the home page for the
<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
sample application.
</p>
# application_helper.rb
module ApplicationHelper
def full_title(page_title)
base_title = "Ruby on Rails Tutorial Sample App"
page_title.empty? ? base_title : "#{base_title} | #{page_title}"
end
end
# application.html.erb
<head>
<title><%= full_title(yield(:title)) %></title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>