<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yamamucho</author_name>
  <author_url>https://blog.hatena.ne.jp/yamamucho/</author_url>
  <blog_title>酔いどれコード</blog_title>
  <blog_url>https://yamamucho.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Sinatra</anon>
  </categories>
  <description>テンプレートに変数を埋め込む方法を調べてみた。 バージョン (2012/09/26 追記) Hamlのバージョンは 2.2.2 を使っています。 コントローラ require 'rubygems' require 'sinatra' get '/:id' do @id = params[:id] @items = ['red', 'green', 'yellow'] haml :index end テンプレート !!! XML !!! %html{html_attrs('ja')} %head %title= @id %body %h1 Hello, @id %h1 Hello, #{@id}…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyamamucho.hatenadiary.org%2Fentry%2F20090817%2F1250516677&quot; title=&quot;Sinatra を使って Haml で作成したテンプレートに変数を埋め込む - 酔いどれコード&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-08-17 22:44:37</published>
  <title>Sinatra を使って Haml で作成したテンプレートに変数を埋め込む</title>
  <type>rich</type>
  <url>https://yamamucho.hatenadiary.org/entry/20090817/1250516677</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
