RubyJSをためしてたらこんな時間で明日が心配な今日この頃です。 RubyJSはUnderscore.jsやstring.jsみたいなJavaScriptのライブラリです。 特徴はRubyの機能をJSで実装しているところ。JS的な書き方を無視して、以下にRubyらしく書けるかに注力されています。RubySpecに準拠するように書かれているので、Rubyを普段使っている人には無意識に使えるようになっています。 使い方は簡単でライブラリを読み込んで、JSの任意のオブジェクトやプリミティブな値を RubyJS メソッドを使ってラップしてやります。この RubyJS メソッドが適切な RubyJS オブジェクトに変換してくれます。もちろん R というエイリアスが切られているので、こちらを使いましょう。 R 'hoge' #=> RubyJS.String R 1 #=> RubyJS.Fixnu
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く