< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事
N :次の記事
|<:スレッドの先頭
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
On Mon, Nov 7, 2011 at 16:30, Kurt Stephens <ks.ruby / kurtstephens.com> wrote:
> Why does YAML need first class status? Define a constructor on the YAML module, and use interpolating heredoc.
>
> require 'pp'
> require 'yaml'
> def YAML.[]str; YAML.load(str); end
>
> x = YAML[<<"..."]
> a: 1
> b: 2
> c: #{ 1 + 1 }
> ...
>
> pp x
Or you can simply define a method called YAML:
require 'yaml'
def YAML(str); YAML.load(str); end
x = YAML <<"..."
a: 1
b: 2
...
p x