class Buildr::ResourcesTask

The resources task is executed by the compile task to copy resource files over to the target directory. You can enhance this task in the normal way, but mostly you will use the task's filter.

For example:

resources.filter.using 'Copyright'=>'Acme Inc, 2007'

Attributes

filter[R]

Returns the filter used to copy resources over. See Buildr::Filter.

Public Instance Methods

exclude(*files) → self click to toggle source

Excludes the specified files in the filter and returns self.

# File lib/buildr/core/compile.rb, line 441
def exclude(*files)
  filter.exclude *files
  self
end
from(*sources) → self click to toggle source

Adds additional directories from which to copy resources.

For example:

resources.from _('src/etc')
# File lib/buildr/core/compile.rb, line 453
def from(*sources)
  filter.from *sources
  self
end
include(*files) → self click to toggle source

Includes the specified files in the filter and returns self.

# File lib/buildr/core/compile.rb, line 432
def include(*files)
  filter.include *files
  self
end
sources() click to toggle source

Returns the list of source directories (each being a file task).

# File lib/buildr/core/compile.rb, line 459
def sources
  filter.sources
end
target → task click to toggle source

Returns the filter's target directory as a file task.

# File lib/buildr/core/compile.rb, line 467
def target
  filter.into @project.path_to(:target, @usage, :resources) unless filter.target || sources.empty?
  filter.target
end