Class: Airake::Projects::Air
- Inherits:
-
Airake::Project
- Object
- Airake::Project
- Airake::Projects::Air
- Defined in:
- lib/airake/projects/air.rb
Overview
Project for AIR application
Instance Attribute Summary collapse
-
#air_path ⇒ Object
readonly
Returns the value of attribute air_path.
-
#appxml_path ⇒ Object
readonly
Returns the value of attribute appxml_path.
-
#assets ⇒ Object
readonly
Returns the value of attribute assets.
-
#certificate ⇒ Object
readonly
Returns the value of attribute certificate.
-
#mxml_path ⇒ Object
readonly
Returns the value of attribute mxml_path.
Attributes inherited from Airake::Project
#base_dir, #debug, #env, #lib_dir, #src_dirs, #swf_path
Instance Method Summary collapse
-
#adl ⇒ Object
ADL command for this project.
-
#adt ⇒ Object
ADT command for this project.
-
#amxmlc ⇒ Object
Flex compiler command (under AIR) for this project.
- #clean ⇒ Object
-
#load(options = {}) ⇒ Object
Load options.
-
#mxmlc(options = {}) ⇒ Object
Flex compiler command for this project.
Methods inherited from Airake::Project
Constructor Details
This class inherits a constructor from Airake::Project
Instance Attribute Details
#air_path ⇒ Object (readonly)
Returns the value of attribute air_path.
8 9 10 |
# File 'lib/airake/projects/air.rb', line 8 def air_path @air_path end |
#appxml_path ⇒ Object (readonly)
Returns the value of attribute appxml_path.
8 9 10 |
# File 'lib/airake/projects/air.rb', line 8 def appxml_path @appxml_path end |
#assets ⇒ Object (readonly)
Returns the value of attribute assets.
9 10 11 |
# File 'lib/airake/projects/air.rb', line 9 def assets @assets end |
#certificate ⇒ Object (readonly)
Returns the value of attribute certificate.
9 10 11 |
# File 'lib/airake/projects/air.rb', line 9 def certificate @certificate end |
#mxml_path ⇒ Object (readonly)
Returns the value of attribute mxml_path.
8 9 10 |
# File 'lib/airake/projects/air.rb', line 8 def mxml_path @mxml_path end |
Instance Method Details
#adl ⇒ Object
ADL command for this project
54 55 56 57 58 |
# File 'lib/airake/projects/air.rb', line 54 def adl = { :appxml_path => @appxml_path, :base_dir => @base_dir, :adl_extra_opts => @adl_extra_opts, :adl_path => @adl_path } Airake::Commands::Adl.new() end |
#adt ⇒ Object
ADT command for this project
61 62 63 64 65 66 |
# File 'lib/airake/projects/air.rb', line 61 def adt = { :air_path => @air_path, :appxml_path => @appxml_path, :swf_path => @swf_path, :base_dir => @base_dir, :assets => @assets, :cert => @certificate, :adt_extra_opts => @adt_extra_opts, :adt_path => @adt_path } Airake::Commands::Adt.new() end |
#amxmlc ⇒ Object
Flex compiler command (under AIR) for this project
40 41 42 |
# File 'lib/airake/projects/air.rb', line 40 def amxmlc mxmlc({ :config_name => "air" }) end |
#clean ⇒ Object
68 69 70 71 72 73 |
# File 'lib/airake/projects/air.rb', line 68 def clean paths = [ @swf_path, @air_path ] paths.each do |path| FileUtils.rm(path, :verbose => true) if File.exist?(path) end end |
#load(options = {}) ⇒ Object
Load options
options
: If nil, options are loaded from airake.yml in root. (All paths relative to base directory)
-
air_path
: Path to AIR file -
mxml_path
: Path to the ProjectName.mxml -
appxml_path
: Path to application descriptor -
assets
: Path to assets -
certificate
: Path to certificate
More options
-
adt_path
-
adl_path
-
adt_extra_opts
-
adl_extra_opts
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/airake/projects/air.rb', line 26 def load( = {}) super() @air_path = File.join(base_dir, [:air_path]) @mxml_path = File.join(base_dir, [:mxml_path]) @appxml_path = File.join(base_dir, [:appxml_path]) ([ :assets, :certificate, :mxmlc_path, :adt_path, :adl_path, :asdoc_path, :mxmlc_extra_opts, :adt_extra_opts, :adl_extra_opts, :asdoc_extra_opts ], ) ensure_exists([ @mxml_path, @appxml_path ]) end |
#mxmlc(options = {}) ⇒ Object
Flex compiler command for this project
45 46 47 48 49 50 51 |
# File 'lib/airake/projects/air.rb', line 45 def mxmlc( = {}) = .merge({ :swf_path => @swf_path, :target_file => @mxml_path, :lib_dir => @lib_dir, :src_dirs => @src_dirs, :debug => @debug, :mxmlc_extra_opts => @mxmlc_extra_opts, :mxmlc_path => @mxmlc_path }) Airake::Commands::Mxmlc.new() end |