Class: Buildr::AS3::Packaging::SwfTask
- Inherits:
-
Rake::FileTask
- Object
- Rake::FileTask
- Buildr::AS3::Packaging::SwfTask
- Includes:
- Extension
- Defined in:
- lib/buildr/as3/packaging/swf.rb
Instance Attribute Summary collapse
-
#src_swf ⇒ Object
Returns the value of attribute src_swf.
-
#target_swf ⇒ Object
Returns the value of attribute target_swf.
Instance Method Summary collapse
-
#initialize(*args) ⇒ SwfTask
constructor
:nodoc:.
- #needed? ⇒ Boolean
Constructor Details
#initialize(*args) ⇒ SwfTask
:nodoc:
37 38 39 40 41 42 43 |
# File 'lib/buildr/as3/packaging/swf.rb', line 37 def initialize(*args) #:nodoc: super enhance do fail "File not found: #{src_swf}" unless File.exists? src_swf FileUtils.cp(src_swf, target_swf) end end |
Instance Attribute Details
#src_swf ⇒ Object
Returns the value of attribute src_swf.
35 36 37 |
# File 'lib/buildr/as3/packaging/swf.rb', line 35 def src_swf @src_swf end |
#target_swf ⇒ Object
Returns the value of attribute target_swf.
35 36 37 |
# File 'lib/buildr/as3/packaging/swf.rb', line 35 def target_swf @target_swf end |
Instance Method Details
#needed? ⇒ Boolean
45 46 47 48 |
# File 'lib/buildr/as3/packaging/swf.rb', line 45 def needed? return true unless File.exists?(target_swf) File.stat(src_swf).mtime > File.stat(target_swf).mtime end |