Class: Paperwork::Tasks::BuildFile
- Includes:
- Rake::DSL
- Defined in:
- lib/paperwork/tasks/build_file.rb
Overview
file task generator linking source files into the middleman template directory
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name, source, *dependencies) ⇒ BuildFile
constructor
A new instance of BuildFile.
- #tasks ⇒ Object
Methods inherited from Base
#create_tasks, explain, #register, #registered?, #registered_tasks
Constructor Details
#initialize(name, source, *dependencies) ⇒ BuildFile
Returns a new instance of BuildFile.
18 19 20 21 |
# File 'lib/paperwork/tasks/build_file.rb', line 18 def initialize(name, source, *dependencies) super(name, source, *dependencies) @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
14 15 16 |
# File 'lib/paperwork/tasks/build_file.rb', line 14 def source @source end |
Instance Method Details
#tasks ⇒ Object
23 24 25 26 27 |
# File 'lib/paperwork/tasks/build_file.rb', line 23 def tasks file self.name => self.dependencies do cp self.source, self.name end end |