YAML front matter in partials

Is it possible to use YAML front matter inside partials? I’m building some components using partials, and I’d like to be able to specify some dummy data within the component (in case it isn’t called with the right data, or for inclusion in a style guide). For example, something like:

_my_component.html.erb:

    ---
    items:
        - Item One
        - Item Two
    ---

    <ul class="my-class">
          <% (items || data.items).each do |item| %>
              <li><%= item %></li>
          <% end %>
    </ul>

Is this possible?

I’m not sure about inline but I’ve done that using an external data file. data/contact.yml has

- title:
  icon:
  link:

then source/partials/_contact.erb contains:

   <% data.contact.each do |c| %>
     <li>
       <% link_to c['link'], { :class=>'contact' } do %>
         <span class="fa-stack">
           <i class="fa fa-circle fa-stack-2x"></i>
           <i class="fa fa-<%= c['icon'] %> fa-stack-1x fa-inverse"></i>
         </span><%= c['title'] %>
       <% end %>
     </li>
   <% end %>