1
我正在使用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
我試過了,但沒有解決問題。 – user502052
再次困擾。看到我對你的其他問題的意見... –
我見過「其他問題」(http://stackoverflow.com/questions/6486923/documenting-constants-and-methods-謝謝!),但我仍然解決這個問題。 – user502052