Class: Paperwork::Tasks::BuildFile

Inherits:
BuildDir show all
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

Attributes inherited from Base

#dependencies, #name

Instance Method Summary collapse

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

#sourceObject (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

#tasksObject



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