Class: Corundum::DocumentationTask
- Inherits:
-
Mattock::TaskLib
- Object
- Mattock::TaskLib
- Corundum::DocumentationTask
- Defined in:
- lib/corundum/documentation-task.rb
Class Method Summary collapse
Instance Method Summary collapse
- #default_configuration(toolkit) ⇒ Object
- #define ⇒ Object
- #entry_point ⇒ Object
- #resolve_configuration ⇒ Object
Class Method Details
.title(name) ⇒ Object
18 19 20 |
# File 'lib/corundum/documentation-task.rb', line 18 def self.title(name) setting :title, name end |
Instance Method Details
#default_configuration(toolkit) ⇒ Object
22 23 24 25 |
# File 'lib/corundum/documentation-task.rb', line 22 def default_configuration(toolkit) super toolkit.copy_settings_to(self) end |
#define ⇒ Object
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/corundum/documentation-task.rb', line 41 def define directory target_dir.abspath in_namespace do desc "Open up a browser to view your documentation" BrowserTask.define_task(self) do |t| t.index_html = entry_point end end end |
#entry_point ⇒ Object
37 38 39 |
# File 'lib/corundum/documentation-task.rb', line 37 def entry_point entry_path.abspath end |
#resolve_configuration ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/corundum/documentation-task.rb', line 27 def resolve_configuration super if field_unset?(:entry_link) self.entry_link = File::join(target_dir.relpath, entry_path.relpath) end resolve_paths end |