Sha256: e6da017a4fa640dc564b6b7e3f3c1d11bb8708334273b7b93d4d13161640dffc

Contents?: true

Size: 686 Bytes

Versions: 3

Compression:

Stored size: 686 Bytes

Contents

require "thor/actions"
module Gator
  module AS3
    class AS3ClassGenerator < Gator::Generators::Base
      include Gator::Project, Thor::Actions

      specify "as3class", "as3c"

      argument :package_name, :type => :string, :desc => "The name of the package."
      argument :class_name, :type => :string, :desc => "The name of the class."
      desc "Creates an ActionScript3 Class"

      def self.source_root
        File.dirname(__FILE__)
      end

      def create_class
        src = project.path(:source, :main, :as3)
        template "AS3ClassTemplate.as.tt", File.join(src, "#{class_name}.as" )
      end

    end

    Gator::Generators.add AS3ClassGenerator
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gator-0.0.7.pre lib/__legacy/default/generators/as3_class_generator.rb
gator-0.0.6.pre lib/__legacy/default/generators/as3_class_generator.rb
gator-0.0.5.pre lib/default/generators/as3_class_generator.rb