English 中文(简体)
如何为RDoc增加一页?
原标题:How to add a page to RDoc?
  • 时间:2012-05-13 23:13:47
  •  标签:
  • ruby
  • rdoc

在这里,Noob试图列举在我的RDoc文件上增加一页的简单任务。 如果我有<代码>rake doc:app,并看一页,那么就有一个旁边的路障,说的是“Pages”与ReADME_FOR_APP。 我所要做的是建立一个名为“Cheatsheet”的网页,该网页将出现在“Pages”下。 我如何建立一个文件页,并向RDoc说明新页的内容?

最佳回答

海事组织是环绕的。 这里指的是:

Nutshell版本:

• 开展铁路图书馆名录的“应用”任务,例如,我使用:

~/.rvm/gems/ruby-1.9.2-p0@foo/gems/railties-3.0.9/lib/rails/tasks/documentation.rake

你们需要考虑(大约)这一点:

namespace :doc do
  def gem_path(gem_name)
    path = $LOAD_PATH.grep(/#{gem_name}[w.-]*/lib$/).first
    yield File.dirname(path) if path
  end

  RDocTaskWithoutDescriptions.new("app2") { |rdoc|
    rdoc.rdoc_dir =  doc/app 
    rdoc.template = ENV[ template ] if ENV[ template ]
    rdoc.title    = ENV[ title ] || "Rails Application Documentation"
    rdoc.options <<  --line-numbers  <<  --inline-source 
    rdoc.options <<  --charset  <<  utf-8 
    rdoc.rdoc_files.include( doc/*_FOR_APP ) # Modified this line
    rdoc.rdoc_files.include( app/**/*.rb )
    rdoc.rdoc_files.include( lib/**/*.rb )
  }
end

页: 1

Update the task name if you want to keep the original, e.g., "app2".

更新<代码>doc/README_FOR_APP>,说明范围更广的模式,或增加处理的新档案。

创建<条码>doc/Cheatsheet_FOR_APP和新的<条码>rake doc:app2 这项任务将继续下去。

问题回答

暂无回答




相关问题
Ruby parser in Java

The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...

rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

multiple ruby extension modules under one directory

Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I ve a project with two extension modules, foo.so and bar.so which ...

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

热门标签