Class: Rog::BlogTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Rog::BlogTask
- Defined in:
- lib/rog/rogtasks.rb
Overview
Rake task library that provides a set of tasks to transform documentation using Rog. To use, create a new instance of this class in your Rakefile, performing appropriate configuration in a block supplied to new. This will automatically register a set of tasks with names based on the name you supply. The tasks defined are:
#{name} - Transform all documentation, copy resources.
#{name}_pages - Transform all pages
#{name}_res - Copy resources
#{name}_monitor - Start watching for changes
#clobber_{name} - Remove output
Instance Attribute Summary collapse
-
#archives_path ⇒ Object
Returns the value of attribute archives_path.
-
#blog_path ⇒ Object
Returns the value of attribute blog_path.
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
-
#pages_path ⇒ Object
Returns the value of attribute pages_path.
-
#posts_path ⇒ Object
Returns the value of attribute posts_path.
Instance Method Summary collapse
-
#initialize(name = :blog) {|_self| ... } ⇒ BlogTask
constructor
Create a new BlogTask, using the supplied block for configuration, and define tasks with the specified base-name within Rake.
Constructor Details
#initialize(name = :blog) {|_self| ... } ⇒ BlogTask
Create a new BlogTask, using the supplied block for configuration, and define tasks with the specified base-name within Rake.
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/rog/rogtasks.rb', line 47 def initialize(name = :blog) # :yield: self if block_given? @name = name @blog_path = 'blog' @pages_path = "#{@blog_path}/pages" @archives_path = "#{@pages_path}/archives" @posts_path = "#{@pages_path}/posts" @output_dir = './output' yield self if block_given? define_subtasks super() end |
Instance Attribute Details
#archives_path ⇒ Object
Returns the value of attribute archives_path.
43 44 45 |
# File 'lib/rog/rogtasks.rb', line 43 def archives_path @archives_path end |
#blog_path ⇒ Object
Returns the value of attribute blog_path.
43 44 45 |
# File 'lib/rog/rogtasks.rb', line 43 def blog_path @blog_path end |
#output_dir ⇒ Object
Returns the value of attribute output_dir.
43 44 45 |
# File 'lib/rog/rogtasks.rb', line 43 def output_dir @output_dir end |
#pages_path ⇒ Object
Returns the value of attribute pages_path.
43 44 45 |
# File 'lib/rog/rogtasks.rb', line 43 def pages_path @pages_path end |
#posts_path ⇒ Object
Returns the value of attribute posts_path.
43 44 45 |
# File 'lib/rog/rogtasks.rb', line 43 def posts_path @posts_path end |