Sha256: de6f736cb6db7f3d92f0c8a2ae33f24e4042f2e74aa1e2be2585a22fbe0376fc

Contents?: true

Size: 734 Bytes

Versions: 1

Compression:

Stored size: 734 Bytes

Contents

module Gator
  module AS3
    module RobotLegs

      class ContextGenerator < Gator::AS3::KlassGenerator
        include Gator::Project
        include WithRobotLegsTemplates

        define :command => "context",
               :usage => "generate as3 rl context CLASS_NAME", :description => "Creates RobotLegs Context class."

       def template_file
         "as3/robotlegs/context.as.tt"
       end

       def generate
         @class_name += "Context" unless @class_name.match(/Context$/)
         super
       end
       
       def generate_test
         return unless options[:test]
         invoke resolve_subcommand(generate_test_command_fallback), ["#{package_and_class}Context"]
       end

      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gator-as3-robotlegs-0.0.3.pre lib/gator/as3/robotlegs/generators/context.rb