Sha256: c2e6df77a2fe21d421038fa21b9b09bcdd12330226dd34d978dd26e31ffc4068

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

module AS3
  class ProjectGenerator < ClassGenerator

    ##
    # The path where assets will be created.
    add_param :assets, String, { :default => 'assets' }

    ##
    # The path where skins will be created.
    add_param :skins, String, { :default => 'skins' }

    ##
    # The path where test cases should be created.
    add_param :test, String, { :default => 'test' }

    ##
    # The path where libraries should be added.
    add_param :lib, String, { :default => 'lib' }

    ##
    # The path where binaries should be created.
    add_param :bin, String, { :default => 'bin' }

    def manifest
      directory input do
        template 'rakefile.rb'
        template 'Gemfile'

        directory src do
          template "#{input}.as", 'ActionScript3MainClass.as'
        end

        directory assets do
          directory skins do
            file 'DefaultProjectImage.png'
          end
        end

        # Create empty directories:
        directory lib
        directory bin
      end
    end

    protected

      def debug_swf_name
        "#{class_name}.swf"
      end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
as3-1.0.1.pre lib/as3/generators/project_generator.rb
as3-1.0.0.pre lib/as3/generators/project_generator.rb