我正在使用 Ruby on Rails 3.0.7,并且正在使用 RDoc 为我的应用程序编写一些文档。在我的应用程序文件中,我有这个:
#[EXAMPLE 1 - Some text.]
#
# [CASE 1 - Some text.]
#
# class User < ActiveRecord::Base
# has_many :account,
# :class_name => 'User::Account',
# :foreign_key => 'account_id'
# end
在为我的应用程序生成文档时,上面注释的代码将离开段落块之外的部分应该出现的地方class User < ActiveRecord::Base
。end
以下是相关的屏幕截图:
我该如何解决?
如果我使用它,我会得到相同的输出(在应该出现类语句的段落块之外)
#[Example 1 - Some text.]
#
# class User < ActiveRecord::Base
# has_many :account,
# :class_name => 'User::Account',
# :foreign_key => 'account_id'
# end
或这个
#class User < ActiveRecord::Base
# has_many :account,
# :class_name => 'User::Account',
# :foreign_key => 'account_id'
#end