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
22 23 24 25 26 27 28 |
# File 'lib/docter/rake.rb', line 22 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
30 31 32 33 34 35 36 |
# File 'lib/docter/rake.rb', line 30 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 |