RDoc不生成源文件

| 我正在将Rdoc 2.58与Ruby 1.9.2p138结合使用。当我使用Darkfish格式(这是唯一的选择)生成rdoc文件时,没有获得源代码预览。没有错误消息,并且正在为所有类生成HTML文件。 我已经尝试过更新gem并阅读帮助文件,但没有找到解决此问题的任何方法。 这是一个已知的问题?我还能尝试什么? 更新: 示例代码:
class Iamaclass
    def initialize
        @name = \"superclass\"
    end

    def get_name
        @name
    end

    def proud?
        true
    end
end
Rdoc 2.5.8输出
Parsing sources...
100% [ 1/ 1]  someruby.rb                                                       

Generating Darkfish...

Files:         1
Classes:       1 (    1 undocumented)
Constants:     0 (    0 undocumented)
Modules:       0 (    0 undocumented)
Methods:       3 (    3 undocumented)
  0.00% documented

Elapsed: 0.0s
源代码不会在生成的rdoc中切换。 Rdoc 3.5.3输出
100% [ 1/ 1]  someruby.rb                                                       

Generating Darkfish format into /Users/paul/dev/alesrelated/someruby/doc...

Files:      1

Classes:    1 (1 undocumented)
Modules:    0 (0 undocumented)
Constants:  0 (0 undocumented)
Attributes: 0 (0 undocumented)
Methods:    3 (3 undocumented)

Total:      4 (4 undocumented)
  0.00% documented

Elapsed: 0.1s
源代码确实在html输出中切换。     
已邀请:
您需要在代码中添加注释,您可以尝试使用以下示例:
# A description about this class
class Iamaclass
 # A description about this method
 def initialize
    @name = \"superclass\"
 end

 # Another description about some other method
 def get_name
    @name
 end

 def proud?
    true
 end
end
之后,您可以尝试再次运行rdoc命令。     

要回复问题请先登录注册