Class: AsProject::HAMTASC
- Inherits:
-
MTASC
- Object
- Rake::TaskLib
- RemoteFileTask
- MTASC
- AsProject::HAMTASC
- Defined in:
- lib/tasks/hamtasc.rb
Instance Attribute Summary collapse
-
#pack_path ⇒ Object
Returns the value of attribute pack_path.
-
#rb_entry ⇒ Object
Returns the value of attribute rb_entry.
-
#rb_exclude_path ⇒ Object
Returns the value of attribute rb_exclude_path.
-
#rb_exclude_swf ⇒ Object
Returns the value of attribute rb_exclude_swf.
Attributes inherited from MTASC
#class_path, #compiler_version, #frame, #header, #input, #input_swf, #main, #mx, #name, #output, #verbose, #version
Attributes inherited from RemoteFileTask
#name, #osx_extracted_file, #osx_url, #unix_extracted_file, #unix_url, #user_task, #win_extracted_file, #win_url
Instance Method Summary collapse
- #compile_task_desc ⇒ Object
- #define ⇒ Object
-
#initialize(name = :compile, do_not_define = false) {|_self| ... } ⇒ HAMTASC
constructor
A new instance of HAMTASC.
- #option_list ⇒ Object
- #remote_task_name ⇒ Object
Methods inherited from MTASC
#add_path, #recurse_exclude_path
Methods inherited from RemoteFileTask
#clean_path, #define_user_task, #execute
Constructor Details
#initialize(name = :compile, do_not_define = false) {|_self| ... } ⇒ HAMTASC
Returns a new instance of HAMTASC.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/tasks/hamtasc.rb', line 14 def initialize(name=:compile, do_not_define=false) @pack_path = [] @exclude_packages = [] @rb_exclude_path = [] super(name, true) do |s| s.compiler_version = '1.12.rb.20' s.win_url = "http://asproject.googlecode.com/files/hamtasc-#{compiler_version}.zip" s.win_extracted_file = "/hamtasc-#{compiler_version}/hamtasc.exe" s.osx_url = nil s.osx_extracted_file = nil s.unix_url = nil s.unix_extracted_file = nil end yield self if block_given? define unless do_not_define end |
Instance Attribute Details
#pack_path ⇒ Object
Returns the value of attribute pack_path.
9 10 11 |
# File 'lib/tasks/hamtasc.rb', line 9 def pack_path @pack_path end |
#rb_entry ⇒ Object
Returns the value of attribute rb_entry.
9 10 11 |
# File 'lib/tasks/hamtasc.rb', line 9 def rb_entry @rb_entry end |
#rb_exclude_path ⇒ Object
Returns the value of attribute rb_exclude_path.
9 10 11 |
# File 'lib/tasks/hamtasc.rb', line 9 def rb_exclude_path @rb_exclude_path end |
#rb_exclude_swf ⇒ Object
Returns the value of attribute rb_exclude_swf.
9 10 11 |
# File 'lib/tasks/hamtasc.rb', line 9 def rb_exclude_swf @rb_exclude_swf end |
Instance Method Details
#compile_task_desc ⇒ Object
51 52 53 |
# File 'lib/tasks/hamtasc.rb', line 51 def compile_task_desc return "Compile #{name} using HAMTASC" end |
#define ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/tasks/hamtasc.rb', line 31 def define if(rb_exclude_path.size > 0) @exclude_packages = rb_exclude_path # rb_exclude_path.each do |path| # @exclude_packages << recurse_exclude_path(path) # end end @cleaned_pack_path = [] pack_path.each do |path| add_path(path, @cleaned_pack_path) end super end |
#option_list ⇒ Object
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/tasks/hamtasc.rb', line 55 def option_list result = super input = result.pop if(input) result << "-rb_entry" << rb_entry if rb_entry result << "-rb_exclude_swf" << clean_path(rb_exclude_swf) if rb_exclude_swf result << "-rb_exclude_package " << @exclude_packages.join(" -rb_exclude_package ") if @exclude_packages.size > 0 result << "-pack " + @cleaned_pack_path.join(" -pack ") if pack_path.size > 0 result << input if input return result end |
#remote_task_name ⇒ Object
47 48 49 |
# File 'lib/tasks/hamtasc.rb', line 47 def remote_task_name return "hamtasc-#{compiler_version}" end |