Class: AsProject::SWFMill
- Inherits:
-
RemoteFileTask
- Object
- Rake::TaskLib
- RemoteFileTask
- AsProject::SWFMill
- Defined in:
- lib/tasks/swfmill.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
Returns the value of attribute input.
-
#name ⇒ Object
Returns the value of attribute name.
-
#output ⇒ Object
Returns the value of attribute output.
-
#simple ⇒ Object
Returns the value of attribute simple.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from RemoteFileTask
#osx_extracted_file, #osx_url, #unix_extracted_file, #unix_url, #user_task, #win_extracted_file, #win_url
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(name, do_not_define = false) ⇒ SWFMill
constructor
A new instance of SWFMill.
- #option_list ⇒ Object
- #remote_task_name ⇒ Object
Methods inherited from RemoteFileTask
#clean_path, #define_user_task, #execute
Constructor Details
#initialize(name, do_not_define = false) ⇒ SWFMill
Returns a new instance of SWFMill.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/tasks/swfmill.rb', line 14 def initialize(name, do_not_define=false) @simple = true @input = nil @output = nil @options = [] @version = '0.2.12' @win_url = "http://www.swfmill.org/releases/swfmill-#{version}-win32.zip" @win_extracted_file = "/swfmill-#{version}-win32/swfmill.exe" # @osx_url = "http://www.swfmill.org/releases/swfmill-0.2.12-macosx.tar.gz" # @osx_extracted_file = nil # @unix_url = nil # @unix_extracted_file = nil super(name, true) define unless do_not_define end |
Instance Attribute Details
#input ⇒ Object
Returns the value of attribute input.
8 9 10 |
# File 'lib/tasks/swfmill.rb', line 8 def input @input end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/tasks/swfmill.rb', line 8 def name @name end |
#output ⇒ Object
Returns the value of attribute output.
8 9 10 |
# File 'lib/tasks/swfmill.rb', line 8 def output @output end |
#simple ⇒ Object
Returns the value of attribute simple.
8 9 10 |
# File 'lib/tasks/swfmill.rb', line 8 def simple @simple end |
#version ⇒ Object
Returns the value of attribute version.
8 9 10 |
# File 'lib/tasks/swfmill.rb', line 8 def version @version end |
Instance Method Details
#define ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/tasks/swfmill.rb', line 34 def define super if(@input.nil?) raise Error.new('SWFMill task requires that input be set') end if(@output.nil?) raise Error.new('SWFMill task requires that output be set') end file input file output => [input] do |f| user_task.execute(option_list.join(' ')) # sh %{swfmill #{option_list}} end desc "#{name} using SWFMill" task name => [input, output] CLEAN.add(output) self end |
#option_list ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/tasks/swfmill.rb', line 58 def option_list result = @options.dup result << "simple" if simple result << input if input result << output if output return result end |
#remote_task_name ⇒ Object
30 31 32 |
# File 'lib/tasks/swfmill.rb', line 30 def remote_task_name return "swfmill-#{version}" end |