Module: Docter::Rake
- Defined in:
- lib/docter/rake.rb
Class Method Summary collapse
- .generate(target, collection, template, *args) ⇒ Object
- .serve(task_name, collection, template, *args) ⇒ Object
Class Method Details
.generate(target, collection, template, *args) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/docter/rake.rb', line 6 def generate(target, collection, template, *args) = Hash === args.last ? args.pop.clone : {} args.each { |arg| [arg.to_sym] = true } file target=>collection.dependencies + template.dependencies do |task| collection.generate template, task.name, [:one_page] ? :one_page : :all, end end |
.serve(task_name, collection, template, *args) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/docter/rake.rb', line 14 def serve(task_name, collection, template, *args) = Hash === args.last ? args.pop.clone : {} args.each { |arg| [arg.to_sym] = true } task task_name do collection.serve template, end end |