Class: FlexUtils::Compc
Instance Attribute Summary collapse
-
#include_classes ⇒ Object
writeonly
hash manifest_file => namespace_uri.
-
#include_files ⇒ Object
writeonly
hash manifest_file => namespace_uri.
-
#include_sources ⇒ Object
writeonly
hash manifest_file => namespace_uri.
-
#manifest ⇒ Object
writeonly
hash manifest_file => namespace_uri.
Attributes inherited from Asc
#debug, #defines, #external_library_path, #fail_on_error, #fail_on_warning, #incremental, #keep_as3_metadata, #library_path, #locale, #optimize, #output, #source_path, #strict, #target_player, #use_network, #verbose_stacktraces, #warnings
Class Method Summary collapse
Instance Method Summary collapse
- #compiler_base_name ⇒ Object
- #compiler_flags ⇒ Object
-
#initialize(output) ⇒ Compc
constructor
A new instance of Compc.
Methods inherited from Asc
#command_string, compile, #compile!, #compiler=, #defines_str
Constructor Details
#initialize(output) ⇒ Compc
Returns a new instance of Compc.
10 11 12 13 14 15 16 17 18 |
# File 'lib/flexutils/compc.rb', line 10 def initialize( output ) super(output) @include_classes = [] @include_sources = [] @manifest = Hash.new @include_files = Hash.new end |
Instance Attribute Details
#include_classes=(value) ⇒ Object (writeonly)
hash manifest_file => namespace_uri
5 6 7 |
# File 'lib/flexutils/compc.rb', line 5 def include_classes=(value) @include_classes = value end |
#include_files=(value) ⇒ Object (writeonly)
hash manifest_file => namespace_uri
5 6 7 |
# File 'lib/flexutils/compc.rb', line 5 def include_files=(value) @include_files = value end |
#include_sources=(value) ⇒ Object (writeonly)
hash manifest_file => namespace_uri
5 6 7 |
# File 'lib/flexutils/compc.rb', line 5 def include_sources=(value) @include_sources = value end |
#manifest=(value) ⇒ Object (writeonly)
hash manifest_file => namespace_uri
5 6 7 |
# File 'lib/flexutils/compc.rb', line 5 def manifest=(value) @manifest = value end |
Class Method Details
.to_class_list(files, source_root) ⇒ Object
24 25 26 27 28 |
# File 'lib/flexutils/compc.rb', line 24 def Compc.to_class_list( files, source_root ) classes = files.map do |file| file.gsub(source_root, "").gsub(/\..+?$/, "").gsub(/\//, ".") end end |
Instance Method Details
#compiler_base_name ⇒ Object
20 21 22 |
# File 'lib/flexutils/compc.rb', line 20 def compiler_base_name "compc" end |
#compiler_flags ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/flexutils/compc.rb', line 30 def compiler_flags all_flags = super() all_flags << "-include-classes #{@include_classes.join(" ")}" unless @include_classes.empty? all_flags << "-include-sources #{@include_sources.join(" ")}" unless @include_sources.empty? all_flags << "-output #{@output}" all_flags << "-theme #{@theme}" unless @theme.nil? all_flags end |