Class: Buildr::AS3::Packaging::SwcTask
- Inherits:
-
Rake::FileTask
- Object
- Rake::FileTask
- Buildr::AS3::Packaging::SwcTask
- Includes:
- Extension
- Defined in:
- lib/buildr/as3/packaging/swc.rb
Instance Attribute Summary collapse
-
#src_swc ⇒ Object
Returns the value of attribute src_swc.
-
#target_swc ⇒ Object
Returns the value of attribute target_swc.
Instance Method Summary collapse
-
#initialize(*args) ⇒ SwcTask
constructor
:nodoc:.
- #needed? ⇒ Boolean
Constructor Details
#initialize(*args) ⇒ SwcTask
: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
#src_swc ⇒ Object
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 |
#target_swc ⇒ Object
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
#needed? ⇒ 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 |