module Sprout class MXMLCFlexBuilder < MXMLCHelper # :nodoc: PROJECT = '.project' ACTION_SCRIPT_PROPERTIES = '.actionScriptProperties' def initialize(args, &block) super t = file PROJECT do |t| File.open(t.name, 'w') do |file| file.write t.to_xml end end configure_project_task t t = file ACTION_SCRIPT_PROPERTIES do |t| File.open(t.name, 'w') do |file| file.write t.to_xml end end configure_action_script_properties t task args => [PROJECT, ACTION_SCRIPT_PROPERTIES] end def configure_project_task(project_task) def project_task.xml=(str) @xml = str end project_task.xml = < #{model.project_name} com.adobe.flexbuilder.project.flexbuilder com.adobe.flexbuilder.project.actionscriptnature EOF def project_task.to_xml return @xml end end def configure_action_script_properties(properties_task) def properties_task.xml=(str) @xml = str end str1 = < EOF str2 = "" model.source_path.each do |path| str2 << "\n" end str3 = < EOF str4 = < EOF str5 = "" model.library_path.each do |path| str5 << "\n" end str6 = < EOF properties_task.xml = str1 + str2 + str3 + str4 + str5 + str6 def properties_task.to_xml return @xml end end end end def flex_builder(args, &block) return Sprout::MXMLCFlexBuilder.new(args, &block) end