Class: RakeTasks::Doc
- Inherits:
-
Object
- Object
- RakeTasks::Doc
- Defined in:
- lib/rake_tasks/doc.rb
Overview
This class will handle documentation utilities.
Instance Method Summary collapse
-
#initialize(gem_info = RakeTasks::Gem) ⇒ Doc
constructor
Constructor.
-
#readme_contents ⇒ Object
The default contents for a readme file.
Constructor Details
Instance Method Details
#readme_contents ⇒ Object
The default contents for a readme file.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/rake_tasks/doc.rb', line 46 def readme_contents gem_title = @gem_title gem_spec = @gem_spec @contents ||= %Q{ #{header :h1, "Welcome to #{gem_title}"} #{gem_spec.description} #{header :h2, 'Getting Started'} Install #{gem_title} at the command prompt if you haven't yet: $ gem install #{gem_spec.name} Require the gem in your Gemfile: gem '#{gem_spec.name}', '~> #{gem_spec.version}' Require the gem wherever you need to use it: require '#{gem_spec.name}' #{header :h2, 'Usage'} TODO #{header :h2, 'Additional Notes'} TODO #{header :h2, 'Additional Documentation'} $ rake rdoc:app #{license_details}}.strip return @contents.split("\n") end |