Sha256: cb37562c12b7b84f91d8af6bf4464594d5afe8c7acaf6d941e57ec2e7c6e5547

Contents?: true

Size: 953 Bytes

Versions: 18

Compression:

Stored size: 953 Bytes

Contents

module Sprout # :nodoc:

  # The MXMLCSWC helper wraps a compc task to create
  # a SWC library.
  #
  # The simple case that uses a Singleton ProjectModel:
  #   swc :swc
  #
  # Using a ProjectModel instance:
  #   project_model :model
  #
  #   swc :swc => :model
  #
  # Configuring the proxy MXMLCTask
  #   swc :swc do |t|
  #     t.link_report = 'LinkReport.rpt'
  #   end
  #
  class MXMLCSWC < MXMLCHelper
  
    def initialize(args, &block)
      super
      outer_task = define_outer_task
      
      compc output do |t|
        configure_mxmlc t
        configure_mxmlc_application t
        t.input = input
        yield t if block_given?
      end

      outer_task.prerequisites << output
      return outer_task
    end

    def create_output
      return "#{create_output_base}.swc"
    end
    
    def create_input
      return @model.project_name
    end
  end
end

def swc(args, &block)
    Sprout::MXMLCSWC.new(args, &block)
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
sprout-as3-bundle-1.0.37 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.36 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.32 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.31 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.29 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.30 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.11 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-0.2.9 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.10 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.20 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.12 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.21 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.14 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.22 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.9 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.24 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.23 lib/sprout/tasks/mxmlc_swc.rb
sprout-as3-bundle-1.0.8 lib/sprout/tasks/mxmlc_swc.rb