Class: Buildr::AS3::Packaging::SwcTask

Inherits:
Rake::FileTask
  • Object
show all
Includes:
Extension
Defined in:
lib/buildr/as3/packaging/swc.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (SwcTask) initialize(*args)

:nodoc:



37
38
39
40
41
42
43
# File 'lib/buildr/as3/packaging/swc.rb', line 37

def initialize(*args) #:nodoc:
  super
  enhance do
    fail "File not found: #{src_swc}" unless File.exists? src_swc
    FileUtils.cp(src_swc, target_swc)
  end
end

Instance Attribute Details

- (Object) src_swc

Returns the value of attribute src_swc



35
36
37
# File 'lib/buildr/as3/packaging/swc.rb', line 35

def src_swc
  @src_swc
end

- (Object) target_swc

Returns the value of attribute target_swc



35
36
37
# File 'lib/buildr/as3/packaging/swc.rb', line 35

def target_swc
  @target_swc
end

Instance Method Details

- (Boolean) needed?

Returns:

  • (Boolean)


45
46
47
48
# File 'lib/buildr/as3/packaging/swc.rb', line 45

def needed?
  return true unless File.exists?(target_swc)
  File.stat(src_swc).mtime > File.stat(target_swc).mtime
end