Module: Paperwork
- Defined in:
- lib/paperwork/cli.rb,
lib/paperwork/tasks.rb,
lib/paperwork/config.rb,
lib/paperwork/version.rb,
lib/paperwork/tasks/base.rb,
lib/paperwork/tasks/document.rb,
lib/paperwork/tasks/template.rb,
lib/paperwork/tasks/build_dir.rb,
lib/paperwork/tasks/build_file.rb,
lib/paperwork/tasks/root_helpers.rb
Overview
global paperwork namespace
Defined Under Namespace
Modules: Tasks Classes: CLI, Config
Constant Summary collapse
- VERSION =
"0.5.1"
Instance Method Summary collapse
-
#paperwork(task = nil, sources: [], **options) ⇒ Object
creates the document named by ‘task’.
- #paperwork_configure {|Paperwork::Config.instance| ... } ⇒ Object
Instance Method Details
#paperwork(task = nil, sources: [], **options) ⇒ Object
creates the document named by ‘task’. if a hash is provided instead of task (like in regular task definitions in rake), the first key is used as name and it’s associated values are treated as dependencies of that task.
16 17 18 19 20 21 22 23 24 |
# File 'lib/paperwork/tasks.rb', line 16 def paperwork(task = nil, sources: [], **) dependencies = [] if task.nil? task = .keys.first dependencies = .delete(task) end doc = Paperwork::Tasks::Document.new(task, sources, *dependencies) doc.create_tasks end |