Class: RDoc::Readme::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- RDoc::Readme::RakeTask
- Defined in:
- lib/rdoc-readme/rake_task.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(src = nil, dst = nil) ⇒ RakeTask
constructor
A new instance of RakeTask.
Constructor Details
#initialize(src = nil, dst = nil) ⇒ RakeTask
Returns a new instance of RakeTask.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rdoc-readme/rake_task.rb', line 10 def initialize( src=nil, dst=nil ) @name = 'rdoc:readme' desc('Generate README from RDoc') task @name do ::RDoc::Readme.new do |rdoc| if src && dst File.open(dst, 'w').puts( rdoc.from_file(src) ) elsif src puts rdoc.from_file(src) else puts rdoc.from_file_handle($stdin) end end end end |