Method: RDoc::RubyGemsHook.generate
- Defined in:
- lib/rdoc/rubygems_hook.rb
.generate(installer, specs) ⇒ Object
Post installs hook that generates documentation for each specification in specs
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/rdoc/rubygems_hook.rb', line 54 def self.generate installer, specs start = Time.now types = installer.document generate_rdoc = types.include? 'rdoc' generate_ri = types.include? 'ri' specs.each do |spec| new(spec, generate_rdoc, generate_ri).generate end return unless generate_rdoc or generate_ri duration = (Time.now - start).to_i names = specs.map(&:name).join ', ' say "Done installing documentation for #{names} after #{duration} seconds" end |