Gerbil 文件基礎
Gerbil 文件基本元素 書的結構 對應 Gerbil 元素 章 chapter 節 section <% # parameters for the HTML format $title = "rails 行車手冊" $authors = { 'fhopecc & wind' => 'http://fhopecc.blogspot.com' } %> <% chapter "MVC 模式" do %> <% section "簡介" do %> MVC 模式是 rails 框架所使用的模式。 <% end %> <% end %> Gerbil 是利用 ruby 的區塊(block)語法及 ERB 來模擬標籤語言, chapter 表示 block 中內容是一個章,我們知道章可以包含多個節,故 chapter 的區塊中可包含多個 section ,上述有一個 chapter 其標題為 MVC 模式,而其包含一個 section 簡介。