require 'erb' title = "" layout = "" content = ERB.new(File.read("hoge.html.erb")).result(binding) result = ERB.new(File.read(layout)).result(binding) File.open("hoge.html", "w") do |file| file.puts result end. このようにする。title と layout という2個の変数を作っているのは、 hoge.html.erb に ...

18.02.2016 09:57
=======================================
http://ift.tt/1abnmbU
February 18, 2016 at 05:57PM

コメント

このブログの人気の投稿

投稿時間:2020-07-01 05:34:30 RSSフィード2020-07-01 05:00 分まとめ(37件)

投稿時間:2020-07-01 20:43:40 RSSフィード2020-07-01 20:00 分まとめ(81件)

投稿時間:2020-07-01 08:33:22 RSSフィード2020-07-01 08:00 分まとめ(49件)